What is Laplace estimator?

949    Asked by ColemanGarvin in Data Science , Asked on Dec 18, 2019
Answered by Nitin Solanki

If we consider the spam classification model, it may happen that some words never appear in the past while model building but may appear in a later stage which can make the entire calculation as zero.

To avoid such situations, a Laplace estimator is used. It essentially adds a small number to each of the counts in the frequency table, which in return ensures that the probability of occurring with each class in each feature is non zero. Usually Laplace estimator is set to 1, which ensures that each class-feature combination is found in the data at least once.

It works on the following formula.


In the above equation, 1 is added to all the words in the numerator and 3 is also added in all the denominators to maintain equivalence.



Your Answer

Interviews

Parent Categories