Learn Before
Concept

Avoid zero posiblities

Whilie training, zero probabilities in the likelihood term for any class will cause the probability of the class to be zero, no matter the other evidence. A solution is the add-one (Laplace) smoothing: P(wic)=count(wi,c)+1wV(count(w,c)+1)=count(wi,c)+1wVcount(w,c)+VP(w_i|c) = \frac{count(w_i,c)+1}{\sum_{w\in V}{(count(w,c)+1)}} = \frac{count(w_i,c)+1}{\sum_{w\in V}{count(w,c)}+|V|}

0

1

Updated 2021-09-25

Tags

Data Science

Related