-
Notifications
You must be signed in to change notification settings - Fork 22
Description
When running the reproduction code:
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 '0' of undefined
at squaredEuclidean (\node_modules\ml-distance-euclidean\euclidean.js:6:23)
at euclidean (\node_modules\ml-distance-euclidean\euclidean.js:12:22)
at nearestSearch (\node_modules\ml-knn\lib\index.js:66:33)
at KDTree.nearest (\node_modules\ml-knn\lib\index.js:134:13)
at getSinglePrediction (\node_modules\ml-knn\lib\index.js:384:36)
at KNN.predict (\node_modules\ml-knn\lib\index.js:374:38)
at Object. (index.js:30:23)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)