Naïve Bayes Classifier
Naïve Bayes Classifier
• What is a classifier?
P(h,d1,…….,dn)= P(h)P(d1|h)P(d2|h)………P(dn|h)
=P(h)∏ P(di|h)
The conditional distribution over the class variable h is
Where Z is a scaling factor dependent only on d1, d2,……dn, that is a constant if the values of the
feature variables are known.
Properties of Bayes Classifier
• Incrementality
• Combines prior knowledge and observed data
• Probabilistic hypothesis
Representation Used By Naive Bayes Models
• The representation for naive Bayes is probabilities:
A list of probabilities are stored to file for a learned naive Bayes model. This
includes:
• Class Probabilities: The probabilities of each class in the training dataset.
• Conditional Probabilities: The conditional probabilities of each input value given
each class value.
Calculating Class Probabilities:
• a binary classification the probability of an instance belonging to class 1 would be calculated as:
P(class=1) = count(class=1) / (count(class=0) + count(class=1))