Concept - Posterior Normalization

Definition

Converting the raw (unnormalized) Naive Bayes scores into proper posterior probabilities by dividing each class score by the sum of the scores over all classes (s.161):

Worked values (s.161)

ModelSpam scoreHam scoreTotal
Concept - Multinomial Naive Bayes0.001330.0002960.0016260.818 (~82%)0.182 (~18%)
Concept - Bernoulli Naive Bayes0.005550.0002750.0058250.953 (~95%)0.047 (~5%)

When to use

  • Without normalization we only compare magnitudes (ratios ~4.5 for MNB vs ~20 for BNB) - enough to pick the most likely class.
  • With normalization we get actual posterior probabilities - needed for interpretable statements such as “spam with 95% certainty” (s.161).
  • Both models predict spam, but BNB is more confident (95% vs 82%).

Concept - Posterior Probability, Concept - Naive Bayes, Concept - Likelihood, Concept - Prior Probability

Source chunk: 03 Text Classification - Chunk 06 (s.151-180)