Richard Townsend
ac9fa85307
Fix for error that happens on Go 1.11 and above
2019-03-23 18:54:04 +00:00
Richard Townsend
54a9a24821
Merge pull request #226 from tboudalier/master
...
Adapt for go 1.12 - Issue #225
2019-03-23 18:44:29 +00:00
Thomas Boudalier
e219301900
Adapt for go 1.12 - Issue #225
...
Use now mandatory way to expose C structs with CGO
2019-03-22 10:57:42 +01:00
Soypete
019f1015dd
change gonum matrix definitions to match with current gonum version
2019-03-19 22:49:58 -06: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
ss8651twtw
1e1b5f11fb
Format code
2018-06-16 22:14:18 +08:00
frozenkp
cebc60dc1c
add knn_test
2018-06-16 22:11:59 +08: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
2ef3699056
add test for weighted knn
2017-04-18 23:14:29 +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
Richard Townsend
f339111871
knn: adding additional test case
2016-07-11 23:27:04 +01:00
Richard Townsend
7041fc33c7
base: correct handling of class attributes in ParseCSVToTemplatedInstances
2016-07-11 23:16:18 +01:00
Richard Townsend
457a00ac7c
knn: replicating issue #143 in test suite
2016-07-11 23:05:03 +01:00
Richard Townsend
063aab5c3c
knn: making space for additional test data
2016-07-11 23:01:28 +01: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
9f67f73330
Convert some tests to goconvey, and improve assertions along the way
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
21bb2fc9fa
Remove redundant import renames
2014-08-22 07:21:24 +00:00
Amit Kumar Gupta
36048a9922
Fix error in test description for KnnClassifier
2014-08-20 05:54:28 +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
73e7df1ef0
Refactored KNN
2014-05-04 09:53:53 +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