lecture10

# lecture10 - Data Mining CS57300 Purdue University Naive...

This preview shows pages 1–9. Sign up to view the full content.

Data Mining CS57300 Purdue University September 28, 2010

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Naive Bayes classifier (cont) P ( C | X ) = P ( X | C ) P ( C ) P ( X ) m i =1 P ( X i | C ) P ( C )
NBC learning Estimate prior P(C) and conditional probability distributions P(X i | C) independently w/MLE • P(C)=9/14 P(I=high|C=yes)=2/9 P(I=med|C=yes)=4/9 P(I=low|C=yes)=3/9 etc. age income student credit_rating buys_computer <=30 high no fair no <=30 high no excellent no 31…40 high no fair yes >40 medium no fair yes >40 low yes fair yes >40 low yes excellent no 31…40 low yes excellent yes <=30 medium no fair no <=30 low yes fair yes >40 medium yes fair yes <=30 medium yes excellent yes 31…40 medium no excellent yes 31…40 high yes fair yes >40 medium no excellent no

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Learning CPTs from examples 0 13 2 False 17 13 10 True High Medium Low f( x ) X 1 P[ X 1 = Low | f(x) = True] = 10 (10 + 13 + 17) P[ F(x) = False] = (2 + 13) (2 + 13 + 10 + 13 + 17)
Zero counts are a problem If an attribute value does not occur in training example, we assign zero probability to that value How does that affect the conditional probability P[ F(x) | x ] ? It equals 0!!! Why is this a problem? Adjust for zero counts by “smoothing” probability estimates

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Add uniform prior Smoothing: Laplace correction 0 13 2 False 17 13 10 True High Medium Low f( x ) X 1 P[ X 1 = High | f(x) = False] = 0 (2 + 13 + 0) 0 + 1 + 0) + 3
Is assuming independence a problem? What is the effect on probability estimates? Over-counting evidence, leads to overly confident probability estimate What is the effect on classification? Less clear… For a given input x , suppose f( x ) = True Naïve Bayes will correctly classify if P[ F( x ) = True | x ] > 0.5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Naive Bayes classifier
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern