1
$\begingroup$

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

$\endgroup$

1 Answer 1

0
$\begingroup$

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.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.