This wikipedia article describes spam filtering using Naïve Bayes: https://en.wikipedia.org/wiki/Naive_Bayes_spam_filtering
P(S|W) is given as
Pr(W|S)*Pr(S) / (Pr(W|S)*Pr(S)) + Pr(W|H)*Pr(H)).
However, one could also get
P(S|W) by estimating
Most textbooks simply say it's unnecessary to estimate
P(W) which I get, but one could also say it's unnecessary to estimate
Pr(W|H)*Pr(H). Why is it that estimating
Pr(W|H)*Pr(H)) is preferred?
Example: If we use this example,
The "correct" estimation for
P(yes|rain, good) is
P(rain|yes) * P(good|yes) * P(yes) = 1/5 * 1/5 * 5/10 = 0.02 P(rain|no) * P(good|no) * P(no) = 2/5 * 3/5 * 5/10 = 0.12 P(yes|rain, good) = 0.02 / (0.02 + 0.12) = 0.143
Whereas one could also estimate it as follows which gives
P(rain|yes) * P(good|yes) * P(yes) = 1/5 * 1/5 * 5/10 = 0.02 P(rain, good) = P(rain) * P(good) = 3/5 * 4/5 = 0.48 P(yes|rain, good) = 0.02 / 0.48 = 0.042
My question is, why is the former preferred, even though they seem to make similar approximations