I downloaded the source code and ran node. \knn.js in the./example/leafDataset directory, but I encountered some errors.The error is as follows (I have run the command NPM install libsvm-js ml-naivebayes ml-knn ml-logistic-regression csvtojson) :
`G:\MLJS\ml-master\examples\leafDataset\node_modules\ml-knn\lib\index.js:34
this.dimensions = new Array(points[0].length);
^
TypeError: Cannot read property 'length' of undefined
at new KDTree (G:\MLJS\ml-master\examples\leafDataset\node_modules\ml-knn\lib\index.js:34:45)
at new KNN (G:\MLJS\ml-master\examples\leafDataset\node_modules\ml-knn\lib\index.js:316:19)
at train (G:\MLJS\ml-master\examples\leafDataset\knn.js:60:11)
at dressData (G:\MLJS\ml-master\examples\leafDataset\knn.js:49:5)
at Converter.csv.fromFile.on.on (G:\MLJS\ml-master\examples\leafDataset\knn.js:25:9)
at Converter.emit (events.js:203:15)
at Immediate. (G:\MLJS\ml-master\examples\leafDataset\node_modules\csvtojson\v2\Converter.js:42:23)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)`
Why did this error occur?Is it the versioning of csvtojson?
I downloaded the source code and ran node. \knn.js in the./example/leafDataset directory, but I encountered some errors.The error is as follows (I have run the command NPM install libsvm-js ml-naivebayes ml-knn ml-logistic-regression csvtojson) : `G:\MLJS\ml-master\examples\leafDataset\node_modules\ml-knn\lib\index.js:34 this.dimensions = new Array(points[0].length); ^
TypeError: Cannot read property 'length' of undefined at new KDTree (G:\MLJS\ml-master\examples\leafDataset\node_modules\ml-knn\lib\index.js:34:45) at new KNN (G:\MLJS\ml-master\examples\leafDataset\node_modules\ml-knn\lib\index.js:316:19) at train (G:\MLJS\ml-master\examples\leafDataset\knn.js:60:11) at dressData (G:\MLJS\ml-master\examples\leafDataset\knn.js:49:5) at Converter.csv.fromFile.on.on (G:\MLJS\ml-master\examples\leafDataset\knn.js:25:9) at Converter.emit (events.js:203:15) at Immediate. (G:\MLJS\ml-master\examples\leafDataset\node_modules\csvtojson\v2\Converter.js:42:23)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)`
Why did this error occur?Is it the versioning of csvtojson?