Professional Documents
Culture Documents
Data Mining
Tools & Techniques
Lecture 15
how likely B is on
its own
Bayes’ Theorem
• Example:
– You are planning a picnic today, but the morning is cloudy
– 50% of all rainy days start off cloudy!
– But cloudy mornings are common (about 40% of days start cloudy)
– And this is usually a dry month (only 3 of 30 days tend to be rainy, or 10%)
– What is the chance of rain during the day?
• Solution:
– Chance of Rain given Cloud, P(Rain|Cloud) = ?
• By Bayes’ theorem
Naive Bayesian Classification
• As P(X) is constant for all classes, only P(X|Ci)P(Ci)
needs to be maximized
• If the class prior probabilities are not known, assume
P(C1)=P(C2)=…=P(Cm), and therefore maximize P(X|Ci)
• Class prior probabilities may be estimated by P(Ci) =
|Ci,D|/|D|
•
Example
• P(H|X): posterior probability that customer X will buy a computer
given his age and income
• P(H): prior probability that any given customer will buy a computer
(regardless of age, income)
• Applications
– Real time Prediction
– Multi class Prediction
– Text classification/ Spam Filtering/ Sentiment Analysis
– Recommendation System