On my dataset machineJS failed because it was trying to use negative X values with multinomial Naive Bayes classifier. Suggested solutions: - Skip MultinomialNB when some of the features have negative values. - Use GaussianNB instead. - Normalize features to [0, 1] range.