1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-04-28 13:48:56 +08:00

47 Commits

Author SHA1 Message Date
Jason Zhu
d252e1174b Remove duplicate import paths 2019-11-13 23:09:00 -08:00
Jason Zhu
97f6212319 Fix import paths to use gonum.org/v1/gonum 2019-11-05 21:23:12 -08:00
ryanthecubfan
be0d096140
Removing the not-very-helpful info println
The line results in spammy logs and lives in a function that returns relevant values. Whether optimizations were used or not can be communicated other ways. Libraries should not print to stdout or stderr - it should be up to the consumer of the library to decide when to print.
2018-08-27 13:51:15 -07:00
frozenkp
6b3f7ddab2 format 2018-06-16 22:11:59 +08:00
Richard Townsend
ff52c013eb Update gonum to latest version
Should fix #200 and #205
2018-03-24 00:19:35 +00:00
Richard Townsend
e2279995c1 Fixing all tests 2018-01-28 16:22:33 +00:00
Richard Townsend
fc110aab48 Fix bad import, reformat 2017-09-10 20:35:34 +01:00
Richard Townsend
43f04021af knn: tests now passing 2017-09-09 20:07:56 +01:00
FrozenKP
a08194b3e9 replace output \n with \r when training knn 2017-06-06 23:02:37 +08:00
FrozenKP
110b7dcdc4 change method to make kdtree search more precisely 2017-04-18 23:06:46 +08:00
FrozenKP
b33ef1f117 add weighted knn 2017-04-17 20:37:28 +08:00
FrozenKP
7b765a2f18 add kdtree to knn 2017-04-17 15:20:31 +08:00
FrozenKP
8d0ce56382 go fmt cosine.go and add Cosine distance to knn.Predict 2017-04-07 21:22:40 +08:00
Tim Lebel
1d77ccdec6 Return errors allowing KNNClassifier to implement Classifier 2016-10-10 19:59:47 -07:00
Clint Caywood
d9d15fb735 Fix breakage due to gonum/matrix mat64.ErrShape 2015-10-24 22:44:24 -07:00
Richard Townsend
51ca101d6c Merge pull request #118 from thedadams/master
Fix KNN if all Attributes are FloatAttribute
2015-10-17 22:50:04 +01:00
Donnie Adams
bce1f15444 Update knn.go to allow all FloatAttributes. 2015-10-17 10:56:18 -07:00
Stephen Whitworth
183c672cfe Hopefully, should build now. 2015-01-27 12:32:19 +00: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
Jake Pyne
e5da0a8b04 Correct spelling 2014-09-28 01:34:21 +02:00
Amit Kumar Gupta
529b3bcaa5 Avoid renaming packages on import 2014-08-22 13:39:29 +00:00
Amit Kumar Gupta
21bb2fc9fa Remove redundant import renames 2014-08-22 07:21:24 +00:00
Richard Townsend
47341b2869 base: Cleaned up duplicate Attribute resolution functions 2014-08-03 15:17:20 +01:00
Richard Townsend
5d7a37581a knn: merge from v2-instances 2014-08-03 15:17:05 +01:00
Niclas Jern
779551ee86 One must always convert one's vectors 2014-07-20 20:20:37 +03:00
Niclas Jern
cbb4ae33f8 When the user picks manhattan distance, we should actually use the Manhattan distance function. Also slight refactor to make the code more DRY. 2014-07-20 10:20:28 +03:00
Niclas Jern
627a5537d3 Comments should be of the form "<Struct> ..." or "<MethodName> ..." 2014-07-18 13:48:28 +03:00
Niclas Jern
4d7bc20a36 Should replace "val += 1" with "val++" 2014-07-18 13:25:18 +03:00
Richard Townsend
a2c67592df Adds Instances and Attributes type
* Refactors KNNClassifier to use them
* csv handling moved back into base due to a circular dependency
* Also adds the datasets used to test CSV handling
2014-05-13 22:08:11 +01:00
Stephen Whitworth
1ade0afca6 Refactored KNN to implement the estimator interface 2014-05-05 22:41:55 +01:00
Stephen Whitworth
cd43a6565d Implemented batch and stochastic gradient descent 2014-05-05 21:40:33 +01:00
Stephen Whitworth
b4abf54c07 Changing comments to play nicely with godoc 2014-05-04 09:57:57 +01:00
Stephen Whitworth
82e5bf014f Refactored knn 2014-05-04 09:52:13 +01:00
Stephen Whitworth
aee7e69e7b Update knn.go 2014-05-04 09:39:21 +01:00
Stephen Whitworth
822b4c389f Finished an implementation of KNN 2014-05-03 23:08:43 +01:00
Bert Chang
6157cb836a Temp change some code so we can build via goconvey. 2014-05-02 22:30:40 +08:00
Stephen Whitworth
4fead571ae Refactored the KNN regressor 2014-05-01 21:20:44 +01:00
Stephen Whitworth
8f1de1ba2c Refactoring some stuff 2014-05-01 19:56:30 +01:00
Bert Chang
0c2187763f Add package file, rewrite import. 2014-04-30 22:13:07 +08:00
Stephen Whitworth
e1663eefa8 Starting interface design 2014-04-30 08:57:13 +01:00
Stephen Whitworth
0e86db820e Added KNN Regressor 2014-01-05 00:23:31 +00:00
Stephen Whitworth
334c12385e Added example documentation 2014-01-04 19:31:33 +00:00
Stephen Whitworth
874fc5314d Split it out, created iris example, debugged KNN 2014-01-04 19:14:36 +00:00
Stephen Whitworth
f1d51412ef Move to subclassing 2014-01-04 11:12:06 +00:00
Stephen Whitworth
4e81045015 Tidying up 2013-12-29 00:03:42 +00:00
Stephen Whitworth
cc69c1ab2f Added documentation 2013-12-28 23:48:12 +00:00
Stephen Whitworth
6366d3fa65 KNN Classifier now works 2013-12-28 18:41:13 +00:00