Naive Bayes Algorithm
- Naive Bayes Algorithm has a learning and a classifying functions.
- Naive_Bayes_Learn(examples)
- For each target value $v_j$
- $\hat{P}(v_j) \leftarrow $ estimate $P(v_j)$
- For each attribute value $a_i$ of each attribute $a$ $\hat{P}(a_i\,|\,v_j) \leftarrow$ estimate $P(a_i\,|\,v_j)$
- Classify_New_Instance($x$)
\[ v_{NB} = \argmax_{v_{j} \in V} \hat{P}(v_{j}) \prod_{a_i \in x} \hat{P}(a_{i} \,|\, v_{j}) \]
José M. Vidal
.
18 of 39