Why 2 is added in denominator while performing laplace smoothing in Bernoulli model. Shouldn’t it be |v|?
Smoothing in Bernoulli model
Hey @preetishvij, 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 .