Comparison of different Naive Bayes algorithm for SMS classification

There are various types of Naive Bayes algorithms in the Sklearn library:

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

Topic naive-bayes-algorithim naive-bayes-classifier

Category Data Science


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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.