1
$\begingroup$

While I understand the difference between Multinomial Naive Bayes algorithm and Bernoulli, based on my understanding, Multinomial is always a preferred method for any sort of Text classification(Spam detection, topic categorization, sentiment analysis) as taking the frequency of the word into consideration will have better accuracy than just checking for word occurrence.

Is there any practical use case where Bernoulli will be preferred over Multinomial? Is there any real world example that favors Bernoulli over Multinomial?

$\endgroup$

migrated from stackoverflow.com Jan 3 '18 at 21:00

This question came from our site for professional and enthusiast programmers.

1
$\begingroup$

taking the frequency of the word into consideration will have better accuracy than just checking for word occurrence.

Not necessarily. Multinomial Naive Bayes is in a sense more complex model (you can reduce it to Bernoulli).

Because of that, Bernoulli model can be trained using less data and be less prone to overfitting. You might want to read on bias-variance tradeoff if you want to get more technical explanation why sometimes it's better to use simpler model.

For a concrete example see this notebook that compares aforementioned methods on SMS Spam Collection Data Set. It seems like Bernoulli NB performs better.

$\endgroup$

Your Answer

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