0
$\begingroup$

I understand Multinomial Naive Bayes is a specific instance of Naive Bayes when the data distribution is assumed to be multinomial.

In the sklearn documentation for Multinomial Naive Bayes, it is stated:

Naive Bayes classifier for multinomial models

The multinomial Naive Bayes classifier is suitable for classification with discrete features
(e.g., word counts for text classification). The multinomial distribution normally requires
integer feature counts. However, in practice, fractional counts such as tf-idf may also work.

I observed this to be true when working on a text classification project, the Multinomial Naive Bayes classifier had the best results among the others I tried. Can someone explain why it is suited for discrete features?

$\endgroup$
1
  • $\begingroup$ The multinominal distribution is a distribution over counts of events. $\endgroup$ Apr 18 at 16:16
0
$\begingroup$

Multinational naive Bayes algorithm is a generalization of naive Bayes algorithm for case where your predicted variable is not binary, but has more categories. Why it gave you best results as compared to other algorithms? You were probably lucky. There’s no single best algorithm.

For more details on why naive Bayes works, check Why do naive Bayesian classifiers perform so well?

$\endgroup$
2
  • $\begingroup$ Thank you for your answer, I agree that there is no single best algorithm but my question is why the multinomial naive bayes works well on discrete features, not why the naive bayes works well in general. $\endgroup$
    – user42
    Apr 19 at 7:24
  • $\begingroup$ @user42 this statement is incorrect. Multinomial naive Bayes and Bernoulli naive Bayes differ only in the format of the predicted data, the algorithm is exactly the same in both cases. In both cases, you cannot use continuous features, you need to either transform them or use a different algorithm than the vanilla one stats.stackexchange.com/questions/218492/… The quote above talks only about approximating counts with non-discrete values, so pretending you have discrete data. $\endgroup$
    – Tim
    Apr 19 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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