Naïve Bayes Algorithm
NaïveBayesLearn(examples)
For each target value vj
   P’(vj) estimate P(vj)
   For each attribute value ai of each attribute a
      P’(ai|vj) estimate P(ai|vj)
ClassfyingNewInstance(x)
vnb= argmax P’(vj) Π P’(ai|vj)
aj ε x
vj ε V