There are various types of Naive Bayes algorithms in the Sklearn library:
enter image description here

Can all of them be used for text classifications? And which one's perform bette
I tested out a simple text classification using Multinomial Naive Bayes, Bernoulli
Naive Bayes and Gaussian Naive Bayes. It seemed the Multinomial was somewhat better
I am not sure about others and also my observations could be limited to my dataset


1 Answer 1


As mentioned in the documentation documentation, these variants correspond to different ways to represent the data as features.

So potentially yes, all of them can be used for text classification. However each of them expects the data to be represented in a specific way. For example the Gaussian NB considers features as numerical, so it would make sense to represent the text by its tokens frequency. Bernouilli NB requires boolean features, so the text must be represented as a set with one-hot-encoding.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.