Maximum Likelihood Estimation (MLE, no smoothing)
From fully labelled training data (dual-tape), count and divide:
Transitions:
aij=count(si)count(si→sj)
Emissions:
bi(vk)=count(si)count(si emits vk)
Problem: any count of zero gives probability zero. In Viterbi decoding, a zero anywhere kills that path entirely. With small training sets, many transitions and emissions will be unseen.
Laplace (Add-One) Smoothing
Transitions:
aij=count(si)+∣S∣count(si→sj)+1
Emissions:
bi(vk)=count(si)+∣V∣count(si emits vk)+1
CRITICAL: Denominators Are Different
This is the most common exam error. Transitions add ∣S∣ (number of hidden states) to the denominator. Emissions add ∣V∣ (number of observation symbols) to the denominator. They are different quantities and students who mix them up lose marks.
Why they differ: a transition goes to one of ∣S∣ possible next states, so we smooth across ∣S∣ outcomes. An emission goes to one of ∣V∣ possible observation symbols, so we smooth across ∣V∣ outcomes.
Full Worked Example: COVID HMM (2022 Q9)
Training Data (timesteps 1–7)
States: L, M, H, H, H, M, M
Observations: +, ++, ++, +++, ++, ++, +
Counting Transitions
count(L)=1, count(M)=3, count(H)=3
Without smoothing:
aL→M=11=1.0aM→H=31aM→M=32
aH→H=32aH→M=31aL→L=10=0
aL→L=0 is problematic: if we ever reach state L, we cannot stay there.
With smoothing (∣S∣=3):
aL→M=1+31+1=42aM→H=3+31+1=62
aM→M=3+32+1=63aH→H=3+32+1=63
aH→M=3+31+1=62aL→L=1+30+1=41
Counting Emissions
| State / Obs | + | ++ | +++ |
|---|
| L | 1 | 0 | 0 |
| M | 0 | 3 | 0 |
| H | 0 | 1 | 2 |
count(L)=1, count(M)=3, count(H)=3
Without smoothing:
bL(+)=11=1.0bM(++)=33=1.0bH(++)=31bH(+++)=32
Zeros everywhere: bL(++)=0, bL(+++)=0, bM(+)=0, bM(+++)=0, bH(+)=0.
With smoothing (∣V∣=3):
bL(+)=1+31+1=42bM(++)=3+33+1=64bH(+++)=3+32+1=63
General Smoothing Parameter ω
aij=count(si)+ω⋅∣S∣count(si→sj)+ω
bi(vk)=count(si)+ω⋅∣V∣count(si emits vk)+ω
Laplace smoothing is the special case ω=1. ω can be tuned on a development set (cross-validation).
Summary
| Quantity | MLE (no smoothing) | Laplace (add-one) |
|---|
| aij | count(si)count(si→sj) | count(si)+∥S∥count(si→sj)+1 |
| bi(vk) | count(si)count(si emits vk) | count(si)+∥V∥count(si emits vk)+1 |
| Smoothing amount | None | Shift mass from seen to unseen |
| Most common error | — | Adding ∥V∥ to transition denominator |
Past paper questions: y2022p3q9, y2024p3q8, y2025p3q9