natural
natural copied to clipboard
LogisticRegressionClassifier crashing when train function is called
var classifierLogistic = new natural.LogisticRegressionClassifier();
classifierLogistic.addDocument("unable to connect all websites", "very bad");
classifierLogistic.addDocument("unable to connect some websites", "bad");
classifierLogistic.train();
Natural: 0.4.0
Please help. My whole node js app is crashing when i am training the classifier
seems fine to me , no crashes
I am attaching a zip which contains the code. The thread will be hung at classifierLogistic.train();
that's because the classify method cannot work with the LogisticRegressionClassifier , use BayesClassifier instead. here
var natural = require('natural');
var classifierLogistic = new natural.BayesClassifier();
classifierLogistic.addDocument("unable to connect all websites", "very bad");
classifierLogistic.addDocument("unable to connect some websites", "bad");
classifierLogistic.train(); /// the thread will be hung here
console.log(classifierLogistic.classify('unable to connect some websites'));
this outputs
classify
never gets called and the thread never comes out of the train
method. I do not know how are you getting the output but look at the screen shot I am attaching. You will see that there is no output
Same problem here :/
same problem here! :/
How long did you wait? It worked for me but training took quite a long time.
I still get a memory issue when using logistic regression classifier