0
votes

I’m using multinomial Naive Bayes classifier for text classification consist of (5 classes and 1764 sentences of training data)
As is the code in the link(https://chatbotslife.com/text-classification-using-algorithms-e4d50dcba45) When classifying some data in the classifier,, it changes every run and returns different label every time,, How to fix the label with the same results Thank you …

1
Set the seed for reproducibility.Edward Mendez

1 Answers

0
votes

There shouldn't be a change in your classification. As there are no random initialisations. The similarity between sentences should always be the same. Could you also share your code, so I can have a look.