#053 loadcsv
Loading CSV files with node.js in a form suitable for use in statistical/machine learning algorithms.
Notes
This is my working of an example from the Machine Learning with Javascript course.
Libraries
Uses the following npm modules:
Installation/Setup
$ npm install
Example
The example.js demonstrates loading a simple CSV file (example.csv
) with:
- conversion of the
passed
column to boolean - shuffle and split to data and test set
Example run:
$ node example.js
features: [ [ 12, 22 ], [ 11, 21 ] ]
labels: [ [ true ], [ false ] ]
testFeatures [ [ 10, 20 ] ]
testLabels: [ [ true ] ]