Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Csvtojson versioning problem? #157

Open
caiwanli opened this issue Jan 7, 2020 · 0 comments
Open

Csvtojson versioning problem? #157

caiwanli opened this issue Jan 7, 2020 · 0 comments

Comments

@caiwanli
Copy link

caiwanli commented Jan 7, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant