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 15, 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.

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

Where this sits

A destination. 2 concepts lead here, and nothing in the corpus depends on it.

2Levelsteps in
2Needs firstconcepts
0Opens upnothing further
1Areastays here
Learn these firstSupervised Learning
LEARN FIRST Supervised Learning Naive Bayes
Naive Bayes sits after Supervised Learning, and nothing further depends on it.

Computed from the prerequisite graph, not assigned. How this works