In the bernolli version with laplase smoothing why is +1 added on the numerator and +2 in the denominator , i mean its not necessary because if the word isn’t there it automatically takes 1 right?Did I get something wrong ?As laplase was used to avoid 0 in probability term?
Laplase smoothing in bernolli?
Hey @nikhil_sarda, 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.
Its the way of smoothing, 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.
Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubt section .
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.