Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

25.
An Essay towards solving a
Problem in the Doctrine of
Chances
1763

26.
Example applications
● Given a drug test result, how likely is it a
person has taken drugs?
● Give these words, how likely is it that this
email is spam?
● Given these words, how likely is it they
refer to a product?

27.
Estimate
● 99% accurate drug test
● 1% of people actually take drugs
Given the above, what is the probability that
someone indicated as drug positive by the
test is a drug user?

37.
Drugs test
● 99% accurate, 1% of people take drugs
● Prior probability that someone is a drug
user: 1%
● 1% chance of a false positive
Probability of something not happening is
inverse of it happening.

42.
The theorem
The chance of an event given a signal is the
ratio of:
the prior probability of the event multiplied by
that of seeing the signal given the event
to
all the ways you could see that signal.

56.
Building a spam filter
● Using what we know about Bayes, we're
going to build an NLP spam filter
● We'll use n-grams as our features - the
number of times we have seen each word
● 1-gram is each word, 2-grams are pairs of
words: 2-grams are more accurate but more
complex