Naïve Bayes Algorithm
NaïveBayesLearn(
examples)
For each target value
v
j
P’(v
j
)
←
estimate
P(v
j
)
For each attribute value
a
i
of each attribute
a
P’(a
i
|v
j
)
←
estimate
P(a
i
|v
j
)
ClassfyingNewInstance(x)
v
nb
= argmax
P’(v
j
)
Π
P’(a
i
|v
j
)
a
j
ε x
v
j
ε V