10 Mar 2004
CS 3243 - Uncertainty
5
Naïve Bayes Algorithm
n
n
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
)
n
n
ClassfyingNewInstance(x)
v
nb
= argmax
P’(v
j
)
Π
P’(a
i
|v
j
)
v
j
ε
V
a
j
ε
x