Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference of three Naive Bayes classifiers

Sorry for some grammatical mistakes and misuse of words.

I am currently working with text classification, trying to classify the email.

After my research, i found out Multinomial Naive Bayes and Bernoulli Naive Bayes is more often used for text classification. Bernoulli just cares about whether the word happens or not. Multinomial cares about the number of occurrence of the word.

For Gaussian Naive Bayes, it's usually been used for continuous data and data with normal distribution, eg: height,weight But what is the reason that we don't use Gaussian Naive Bayes for text classification? Any bad things will happen if we apply it to text classification?

like image 596
peter1997546 Avatar asked Oct 27 '25 03:10

peter1997546


1 Answers

We use algorithm based on the kind of dataset we have -

Bernoulli Naive bayes is good at handling boolean/binary attributes, while Multinomial Naive bayes is good at handling discrete values and Gaussian naive bayes is good at handling continuous values.

Consider three scenarios:

  1. Consider a dataset which has columns like has_diabetes, has_bp, has_thyroid and then you classify the person as healthy or not. In such a scenario Bernoulli NB will work well.

  2. Consider a dataset that has marks of various students of various subjects and you want to predict, whether the student is clever or not. Then in this case multinomial NB will work fine.

  3. Consider a dataset that has weight of students and you are predicting height of them, then GaussiaNB will well in this case.

like image 183
Mihir Sheth Avatar answered Oct 28 '25 17:10

Mihir Sheth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!