ml icon indicating copy to clipboard operation
ml copied to clipboard

Csvtojson versioning problem?

Open caiwanli opened this issue 4 years ago • 0 comments

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?

caiwanli avatar Jan 07 '20 08:01 caiwanli