Show us how you are trying to achieve that and tell us which node is generating the error. You only need to show us up to the node generating the error.
Is that the node from https://flows.nodered.org/node/node-red-contrib-machine-learning? Whenever you are using a non-standard node please tell us what you are using.
Have you installed all the requirements mentioned in the link above?
Otherwise I don't think I can help as I know nothing about those nodes. If no-one else responds here you may need to ask on the nodes github page (linked from the page linked). Read through all the issues there first though, in case it is a known problem.