Gaussian NB vs Multinomial NB vs Bernoulli NB — when do you use each?
mediumAnswer
- Gaussian NB: continuous features assumed to be normally distributed per class (baseline for tabular numeric data).
- Multinomial NB: counts / term frequencies — the go-to for bag-of-words text classification.
- Bernoulli NB: binary indicators — text with presence/absence of terms, or clickstream flags.
- Complement NB is a Multinomial NB variant that's more robust on imbalanced text corpora.
Check yourself — multiple choice
- Gaussian NB for text, Bernoulli NB for continuous features
- Gaussian for continuous, Multinomial for counts (e.g., text BoW), Bernoulli for binary indicators
- All three are identical
- Multinomial NB is for regression
Match the likelihood to the feature type: Gaussian / Multinomial / Bernoulli.
#naive-bayes#text#classification
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- How does Bayes' theorem drive Naive Bayes classification?
- Why is Naive Bayes still a solid baseline for text classification?
- Precision vs recall — when do you optimize each?
- Why is logistic regression called a linear model if it uses a sigmoid?
- Generative vs discriminative classifier — what's the difference?
- How do you read a confusion matrix and derive the key metrics?