knn icon indicating copy to clipboard operation
knn copied to clipboard

A k-nearest neighboor classifier algorithm.

Results 4 knn issues
Sort by recently updated
recently updated
newest added

In a situation where 2 different nodes are the same distance from the test node, the returned label is always the last one. For example: ```js import KNN from 'ml-knn';...

When running the reproduction code: [Reproduction](https://gist.github.com/tommed/818ab42c9dfa942a6b026f70c6c2a5fb) The following error occurs when loading from JSON: > node_modules\ml-distance-euclidean\euclidean.js:6 d += (p[i] - q[i]) * (p[i] - q[i]); ^ TypeError: Cannot read property...

when i use web version, it pops me this error. Uncaught TypeError: Cannot read property 'nearest' of undefined at O.getSinglePrediction (knn.js:91)