Why is the vocabulary size multiplied by alpha in the denominator of the smoothed multinomial Naive Bayes likelihood?

Quick Overview

Asks why the smoothed multinomial Naive Bayes likelihood divides by the class token count plus alpha times the vocabulary size. Tests understanding of additive smoothing, probability normalization, the Dirichlet prior view of pseudo-counts and how vocabulary size affects the choice of alpha.

Why is the vocabulary size multiplied by alpha in the denominator of the smoothed multinomial Naive Bayes likelihood?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Why is the vocabulary size multiplied by alpha in the denominator of the smoothed multinomial Naive Bayes likelihood? For reference, the smoothed estimate is $$P(w \mid c) = \frac{\text{count}(w, c) + \alpha}{N_c + \alpha |V|}$$ where $N_c$ is the total number of tokens in class $c$ and $|V|$ is the vocabulary size. ```hint Sum the numerators Add up the smoothed numerators over every word in the vocabulary and compare the total with the denominator. ``` ### What a Strong Answer Covers - The normalization argument: what the numerators sum to over the vocabulary - What happens to the probabilities, and to small versus large classes, if the denominator is $N_c$ alone - The pseudo-count intuition and the Dirichlet prior interpretation - How vocabulary size interacts with the choice of alpha ### Follow-up Questions - What is the smoothed estimate for a word that never appeared in class $c$, and how does it change as $|V|$ grows? - How would you choose alpha in practice? - Bernoulli Naive Bayes smooths with $N_c + 2\alpha$ in the denominator. Why 2 instead of $|V|$?

Overview: Asks why the smoothed multinomial Naive Bayes likelihood divides by the class token count plus alpha times the vocabulary size. Tests understanding of additive smoothing, probability normalization, the Dirichlet prior view of pseudo-counts and how vocabulary size affects the choice of alpha.

General logo
General
Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

Why is the vocabulary size multiplied by alpha in the denominator of the smoothed multinomial Naive Bayes likelihood?

For reference, the smoothed estimate is

P(w∣c)=count(w,c)+αNc+α∣V∣P(w \mid c) = \frac{\text{count}(w, c) + \alpha}{N_c + \alpha |V|}

where NcN_c is the total number of tokens in class cc and ∣V∣|V| is the vocabulary size.

What a Strong Answer Covers Guidance

  • The normalization argument: what the numerators sum to over the vocabulary
  • What happens to the probabilities, and to small versus large classes, if the denominator is NcN_c alone
  • The pseudo-count intuition and the Dirichlet prior interpretation
  • How vocabulary size interacts with the choice of alpha

Follow-up Questions Guidance

  • What is the smoothed estimate for a word that never appeared in class cc , and how does it change as ∣V∣|V| grows?
  • How would you choose alpha in practice?
  • Bernoulli Naive Bayes smooths with Nc+2αN_c + 2\alpha in the denominator. Why 2 instead of ∣V∣|V| ?