The Naive Bayes Algorithm
Note: the features of input are independent to each other.
The algorithm is based on the Bayes Theorem.
The Naive Bayes Classifier
A Naive Bayes Classifier use the algorithm to predict a output class value according to a set of set of attributes.
For loop [each know class value] {
step 1. calculate probabilities of each attribute under the condition of class value.
step 2. get the joint conditional probability of all the attributes of the input.
step 3. calculate the conditional probabilities of the class value.
}
The class with the highest conditional probability wins.
网友评论