How are class-conditional feature probabilities estimated from counts in Multinomial Naive Bayes?

Quick Overview

Explain how Multinomial Naive Bayes turns word counts into class-conditional probabilities. Tests the count-based estimate, additive smoothing and the role of alpha, log-space scoring at prediction time, and how the quantities map to a scikit-learn model.

How are class-conditional feature probabilities estimated from counts in Multinomial Naive Bayes?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

How are class-conditional feature probabilities estimated from counts in Multinomial Naive Bayes? ```hint One distribution per class Treat each class as one big bag of all its training tokens, and ask what should happen to a word that never appears in that bag. ``` ### What a Strong Answer Covers - The count-based estimate of $\theta_{ci}$, with what goes in the numerator and in the denominator - Additive smoothing: why it is needed and what $\alpha$ controls - How the estimates become class scores at prediction time, and why in log space - Where these quantities live in a standard implementation such as scikit-learn ### Follow-up Questions - Where does the smoothed estimate come from in Bayesian terms? - How does the estimate differ in Bernoulli Naive Bayes? - How would you choose $\alpha$? - What happens to a word in a test document that never appeared in the training vocabulary?

Overview: Explain how Multinomial Naive Bayes turns word counts into class-conditional probabilities. Tests the count-based estimate, additive smoothing and the role of alpha, log-space scoring at prediction time, and how the quantities map to a scikit-learn model.

Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

How are class-conditional feature probabilities estimated from counts in Multinomial Naive Bayes?

What a Strong Answer Covers Guidance

  • The count-based estimate of θci\theta_{ci} , with what goes in the numerator and in the denominator
  • Additive smoothing: why it is needed and what α\alpha controls
  • How the estimates become class scores at prediction time, and why in log space
  • Where these quantities live in a standard implementation such as scikit-learn

Follow-up Questions Guidance

  • Where does the smoothed estimate come from in Bayesian terms?
  • How does the estimate differ in Bernoulli Naive Bayes?
  • How would you choose α\alpha ?
  • What happens to a word in a test document that never appeared in the training vocabulary?