Add-One Smoothing
Add-one smoothing adds 1 to every vocabulary item before computing probabilities.
Suppose the vocabulary is:
tea, code, music
and after I like the counts are:
tea: 2
code: 1
music: 0
After add-one smoothing:
tea: 3
code: 2
music: 1
The total is now 6, so:
P(music | I like) = 1 / 6
Add-one smoothing is easy to understand. It is often too blunt for serious systems, but it teaches the principle clearly.
Exercise
After add-one smoothing in the example above, what is the smoothed count for
music?
Compute it first, then check your number.