Machine Learning

Naive Bayes

A classifier that applies Bayes' theorem with one wildly unrealistic assumption — and works embarrassingly well anyway, especially on text.

Reviewed July 16, 2026Stable
Reading level: Curious
Pick your depth ↓

When not to use it

  • When feature dependence carries the signal you need — the independence assumption throws exactly that away.
  • When you need well-calibrated probabilities — its estimates are often pushed toward 0 or 1.
  • On problems where interactions between features are the whole point.

Reach for something else instead

  • Logistic regression — the discriminative counterpart, often better-calibrated.
  • Gradient boosting when accuracy matters more than speed and interpretability.
  • Transformers for text when you have the data and compute and need the ceiling raised.

Sources & further reading

  • Ng & Jordan (2001), On Discriminative vs. Generative Classifiers — the definitive naive-Bayes-vs-logistic-regression comparison.
  • Manning, Raghavan & Schütze, Introduction to Information Retrieval — naive Bayes for text classification.
  • Rish (2001), An Empirical Study of the Naive Bayes Classifier — why it works despite the assumption.

Primary sources, listed so you can check the claims on this page rather than take them on trust.

Where people go wrong

  • Forgetting Laplace smoothing, so an unseen feature zeroes out a whole class probability.
  • Multiplying raw probabilities instead of summing logs, causing numerical underflow.
  • Trusting its probability estimates as calibrated — trust the ranking, not the magnitude.

At a glance

FieldMachine Learning
Based onBayes' theorem + independence assumption
Best attext classification
Superpowerfast, strong baseline
DifficultyBeginner
Flashcards for this concept · study, save or share them →
Question
Answer
1 / 4