Library: node-red-contrib-machine-learning
Notes:
Currently, there is a reported and unresolved bug in their repository. The bug - Node red can't find any of the files you provided the path to them in the nodes. Solution (Works in Linux distributions and MacOS): Provide the full path to your files (as we did in this project). We couldn't make it work in Windows.
The decision tree classifier predictor
node accepts arrays in an array of data and returns the prediction. Have a look at how we sent him data from message to array for prediction
node. Each sub-array corresponds to data that should be sent to get a prediction:
return {
payload: [[...msg.payload.user_code,msg.payload.datetime]]
};