decision-tree package is an example of a machine learning package. It is available at
. The package is installed using the following command:
npm install decision-tree
We need a dataset to use for training/developing our decision tree. I am using the car MPG dataset on this page: https://alliance.seas.upenn.edu/~cis520/wiki/index.php?n=Lectures.DecisionTrees . It did not seem to be available directly, so I copied it into Excel and saved it as a local CSV.
The logic for machine learning is very similar:
Typically, you might use two-thirds ...