Theoretically, Yes. Node.js can be used for machine learning but it is not really the best language for this. Languages like Python and Java are highly recommended for this kind of work than Node JS.