Multivariate Bernoulli Naive Bayes - Laplace Smoothing?

Why did we add 2 to the denominator?

In multivariate bernoulli naive bayes we consider 1/0 for each word which means we take 1 if word is present and 0 if word is not present. So for every word has two choices only, and while applying laplace smoothing we add 1 to the numerator, and 2 to the denominator.

Happy Leaning :blush:

I understand why we add 1 to the numerator nut why do we add 2 to the denominator? Why don’t we add 1 to the denominator also

Its the way of normalization, we added 1 to the numerator, that means some how we introduced an extra example having that word, but this should not be the idle case, The idle case should be we introduce two examples, one of them having the word and one not having it. So 2 is added to the denominator and 1 to the numerator.

Happy Learning :blush:

1 Like

Understood this. Thank you. Can you please also explain why do we add |v| into denominator in multinomial.

More or less the same logic, we assumed that there is an example, having all words in the dictionary, as a result, in numerator 1 be added, so we have added 1 to all the words in the dictionary, so we add |v| to the denominator.

Happy Learning :blush:

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.