1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-05-01 22:18:10 +08:00

291 Commits

Author SHA1 Message Date
Stephen Whitworth
008c441e4c Update README.md 2015-05-06 07:39:21 +01:00
Stephen Whitworth
2b6533e659 Merge pull request #109 from sjwhitworth/fix_breaking_changes
Fixing broken Travis build, with slight refactor.
2015-01-27 13:35:37 +00:00
Stephen Whitworth
092917dee9 Temporarily removing test 2015-01-27 13:24:40 +00:00
Stephen Whitworth
06fc522b20 Merge pull request #104 from Sentimentron/serialise-fix
base: correct some non-deterministic serialisation test behaviour
2015-01-27 13:16:33 +00:00
Stephen Whitworth
183c672cfe Hopefully, should build now. 2015-01-27 12:32:19 +00:00
Stephen Whitworth
545ec789c4 Merge pull request #105 from savorywatt/perceptron
Perceptron
2015-01-27 09:52:43 +00:00
Richard Townsend
04e6c8a414 Rebasing against master 2015-01-15 22:54:16 +00:00
Ross Hendrickson
5c302a11ea Add average perceptron file
Rough out logic flow for an average perceptron

Fleshed out example data. Working on FixedDataGrid
support.

Dont use Binary use Float

Update processData to use base helpers to read csv

Move class to end of feature list

Add test for processData

process data to instances

Create path fixed

Add test around Fit. First steps

Modified example, added tests, small fixes
2015-01-15 22:54:16 +00:00
Richard Townsend
a250e99644 base: correct some non-deterministic serialisation test behaviour 2015-01-15 22:45:05 +00:00
Richard Townsend
dbf1c9a6b3 Merge pull request #103 from mtchavez/fix/readme
Fix example in README
2014-12-22 19:18:16 +00:00
Chavez
3d1384b78c Pass false for header on iris dataset in README example 2014-12-22 08:32:14 -08:00
Chavez
4988a1e8bc Fix example in README 2014-12-21 19:09:43 -08:00
Stephen Whitworth
353cd38e7c Merge pull request #98 from Sentimentron/dense-staging
New DenseInstances conversion function
2014-11-21 13:53:52 +00:00
Stephen Whitworth
7ea42ac80b Merge pull request #101 from Sentimentron/arff-staging
ARFF import/export, CSV export, lossless serialisation
2014-11-21 13:53:43 +00:00
Stephen Whitworth
9c7049ba89 Merge pull request #90 from Sentimentron/cross-fold-staging
Cross-fold validation
2014-11-21 13:53:29 +00:00
Stephen Whitworth
aeb12bd0c7 Merge pull request #99 from Sentimentron/params-staging
MultiLinearSVC class weights
2014-11-21 13:53:00 +00:00
Richard Townsend
e30ff6580a ARFF import/export, CSV export, serialisation
* Only numeric and categorical ARFF attributes are currently supported.
* Only the dense version of the ARFF format is supported.
* Compressed format is .tar.gz file which should allow extensibility.
    * Attributes stored using JSON representations.
* Also offers smarter estimation of the precision of numeric Attributes.
* Also adds support for writing instances to CSV
2014-11-13 20:09:00 +00:00
Richard Townsend
ec846e62d2 Merge pull request #100 from pontusmelke/use-apply
Rewrote gradient descent to use Apply for scalar matrix multiplication.
2014-11-06 09:50:17 +00:00
Pontus Melke
6a04b01f3e Rewrote gradient descent to use Apply for scalar matrix multiplication. 2014-11-06 08:22:18 +01:00
Richard Townsend
8fe06e7332 Support for individual class weightings 2014-10-30 23:28:26 +00:00
Richard Townsend
6929052af0 base: conversion to DenseInstances via DenseCopyOf 2014-10-30 22:10:39 +00:00
Richard Townsend
1e888d2a97 base: More general version of equality 2014-10-30 22:02:38 +00:00
Stephen Whitworth
056ccef9b6 Merge pull request #91 from Sentimentron/numeric-staging
trees: Handling FloatAttributes.
2014-10-27 07:56:19 +00:00
Richard Townsend
b2f5b2840d Cross-fold validation 2014-10-26 17:48:48 +00:00
Richard Townsend
7ba57fe6df trees: Handling FloatAttributes.
This patch adds:

	* Gini index and information gain ratio as
           DecisionTree split options;
	* handling for numeric Attributes (split point
           chosen naïvely on the basis of maximum entropy);
	* A couple of additional utility functions in base/
	* A new dataset (see sources.txt) for testing.

Performance on Iris performs markedly without discretisation.
2014-10-26 17:40:38 +00:00
Stephen Whitworth
fcb96f1fad Merge pull request #87 from Sentimentron/knn-opt-staging
Optimised version of KNN for Euclidean distances
2014-10-12 08:59:40 +01:00
Stephen Whitworth
b3497a9b80 Merge pull request #88 from Sentimentron/linearsvc-staging
Multi-class linear Support Vector Classifiers
2014-10-12 08:59:25 +01:00
Stephen Whitworth
b4733d7109 Merge pull request #89 from Sentimentron/go-1.1-fix
Travis: drop CI support for go 1.1
2014-10-10 10:39:18 +01:00
Richard Townsend
b33c95a770 Travis: drop CI support for go 1.1 2014-10-05 11:25:46 +01:00
Richard Townsend
981d43f1dd Adds support for multi-class linear SVMs.
This patch
  * Adds a one-vs-all meta classifier into meta/
  * Adds a LinearSVC (essentially the same as LogisticRegression
    but with different libsvm parameters) to linear_models/
  * Adds a MultiLinearSVC into ensemble/ for predicting
    CategoricalAttribute  classes with the LinearSVC
  * Adds a new example dataset based on classifying article headlines.

The example dataset is drawn from WikiNews, and consists of an average,
min and max Word2Vec representation of article headlines from three
categories. The Word2Vec model was computed offline using gensim.
2014-10-05 11:15:41 +01:00
Stephen Whitworth
0e4d04af52 Merge pull request #83 from Lupino/master
move ext source to linear_models for easy build
2014-10-01 11:08:38 +01:00
Richard Townsend
527c6476e1 Optimised version of KNN for Euclidean distances
This patch also:
   * Completes removal of the edf/ package
   * Corrects an erroneous print statement
   * Introduces two new CSV functions
      * ParseCSVToInstancesTemplated makes sure that
        reading a second CSV file maintains strict Attribute
        compatibility with an existing DenseInstances
      * ParseCSVToInstancesWithAttributeGroups gives more control
        over where Attributes end up in memory, important for
        gaining predictable control over the KNN optimisation
      * Decouples BinaryAttributeGroup from FixedAttributeGroup for
        better casting support
2014-09-30 23:10:22 +01:00
Stephen Whitworth
8f1bc62401 Merge pull request #85 from okjake/master
Small spelling correction
2014-09-28 09:47:22 +01:00
Jake Pyne
e5da0a8b04 Correct spelling 2014-09-28 01:34:21 +02:00
Ubasic
979c727124 move ext source to linear_models for build static 2014-09-25 16:14:53 +08:00
Stephen Whitworth
fc5eafd82b Merge pull request #82 from Sentimentron/edf-remove
Edf remove
2014-09-25 07:32:27 +01:00
Richard Townsend
49e5012b50 Removed base/edf 2014-09-19 23:03:44 +01:00
Richard Townsend
91cfee0e0e Adding a high-dimensional feature set 2014-09-19 23:03:35 +01:00
Stephen Whitworth
65674e2012 Merge pull request #78 from amitkgupta/master
Convert all tests to Goconvey, ensure all tests make assertions, plus miscellaneous cleanup
2014-08-25 12:52:53 +01:00
Amit Kumar Gupta
93838e30e3 Revert "Remove hardly-used logger"
This reverts commit 151df652cab334066826f53d0c7ad8b48c884cae.
2014-08-25 08:11:36 +00:00
Amit Kumar Gupta
25811f833b Revert "Remove (mostly) unused C print functions in linear package"
This reverts commit f9e41dec2860090e00dd1e0fb74c1beb79197ae5.
2014-08-25 08:11:36 +00:00
Amit Kumar Gupta
f9e41dec28 Remove (mostly) unused C print functions in linear package 2014-08-23 05:27:40 +00:00
Amit Kumar Gupta
4d93b9de89 Convert remaining tests to goconvey 2014-08-23 05:22:16 +00:00
Amit Kumar Gupta
9f67f73330 Convert some tests to goconvey, and improve assertions along the way 2014-08-22 13:39:29 +00:00
Amit Kumar Gupta
1809a8b358 RandomForest returns error when fitting data with fewer features than the RandomForest plans to use
- BaseClassifier Predict and Fit methods return errors
- go fmt ./...

Conflicts:
	ensemble/randomforest.go
	ensemble/randomforest_test.go
	trees/tree_test.go
2014-08-22 13:39:29 +00:00
Amit Kumar Gupta
151df652ca Remove hardly-used logger 2014-08-22 13:39:29 +00:00
Amit Kumar Gupta
f14020f78c Remove unused cross_validation package 2014-08-22 13:39:29 +00:00
Amit Kumar Gupta
529b3bcaa5 Avoid renaming packages on import 2014-08-22 13:39:29 +00:00
Amit Kumar Gupta
478b5055c7 Remove unused untested utility functions 2014-08-22 13:39:29 +00:00
Amit Kumar Gupta
63dcd653b0 NewLogisticRegression returns error instead of nil to indicate error 2014-08-22 13:39:29 +00:00