Laplace Smoothing

I didn’t understand how was vocab size added in the denominator of conditional probability while applying laplace smoothing

Hey,

I assume you understand why we are adding laplace in naive bayes. This is done to prevent getting 0 probability for an unseen word.
In the numerator +1 was added.
In denominator +1 was added to every word in the present vocabulary. so there are v words that’s why |V| is added to the denominator.

Thanks :slight_smile: