Anda di halaman 1dari 4

Naïve Bayes Classifier

Advanced Health Data Analytics


Dr. Alekh Gour
Lecture 1, 3 &4
Bayes Classification Methods

P(H): Probability of Hypothesis


P(X): Probability of Data Sample
P(X|H): The probability of observing the sample X, given that the hypothesis holds
P(H|X): The probability that the hypothesis holds given the observed data sample X

X: Let there be a 35 years old customer with an income of Rs. 50,000/-.


H: Hypothesis that customer will buy insurance.

P(X): Probability that customer is 35 year old and earn Rs. 50,000.
P(H): Probability that any customer will buy insurance regardless of age and income
P(X|H): Probability that customer is 35 years old and earn Rs. 50,000 given that he has bought our computer.
P(H|X): Probability that customer X will buy computer given that we know his age and income.
Bayes Classification Methods

Bayes’ Theorem

P(H | X)  P(X | H )P(H )  P(X | H ) P(H ) / P(X)


P(X)
Bayes Theorem
age income student credit_rating buys_computer
Youth high no fair no
Youth high no excellent no
Middle_Aged high no fair yes
Senior medium no fair yes
Senior low yes fair yes
Senior low yes excellent no
Middle_Aged low yes excellent yes
Youth medium no fair no
Youth low yes fair yes
Senior medium yes fair yes
Youth medium yes excellent yes
Middle_Aged medium no excellent yes
Middle_Aged high yes fair yes
Senior medium no excellent no

Class:
C1:buys_computer = ‘yes’ C2:buys_computer = ‘no’
Data to be classified:
X = (age = youth, Income = medium, Student = yes, Credit_rating = Fair)