Skip to content
Quantoros

Two classes give the same feature likelihood for a sample. What determines the naive Bayes MAP prediction then?

Classic MLLevel: IntermediateClass prior influence

Two classes give the same feature likelihood for a sample. What determines the naive Bayes MAP prediction then?

Hints
  • Bayes' rule includes a class prior.
  • Equal likelihoods do not imply equal posteriors.

Answer

Their prior probabilities break the comparison: posterior scores are prior times likelihood. Verify whether priors are learned from representative class frequencies or supplied deliberately.

Source and licence: scikit-learn 1.7.2 — naive bayes · BSD-3-Clause · answer: Quantoros editorial

Related questions