6
Naïve Bayesian Assumption  Assume instances are independent with every other

7
Application to Spam Filtering

8
Example on single event  I just received an E and want to know if it is spam  S: spam H: healthy  Before any analysis, assume:  Scan through this , found word “ apple ”  What is the probability that E is spam given it contains “ apple ” ?

9
 CONT.  We found that in training dataset  P(W|S)=5%, P(W|H)=0.05%  P(S)=50%, P(H)=50%  Existence of word “ apple ” in E increased the previous 50% probability (prior) to 99% (posterior)  Thus, “ apple ” is a pretty strong indication of spam and  This quantity is also called the “spamicity”

10
Multiple Events  Calculate P(S|W) for every word W  Sort P(S|W) in ascending order and select top 15 words and form a set W  If the word W shows up the first time in the testing , assume P(S|W)=0.4  Scan through the testing and identify the words in W.

11
An contains 2 words in W  According to assumption of Naïve Bayesian classifier, each feature W i is conditionally independent from every other features EventW1W2Spam E1 yes YES E2 yes NO EventW1W2Spam E1 P(S|W1)P(S|W2)P(S) E2 1-P(S|W1)1-P(S|W2)1-P(S)