Bayesian Learning

Naive Bayes Algorithm

  1. Naive_Bayes_Learn(examples)
  2. For each target value $v_j$
    1. $\hat{P}(v_j) \leftarrow $ estimate $P(v_j)$
    2. For each attribute value $a_i$ of each attribute $a$ $\hat{P}(a_i\,|\,v_j) \leftarrow$ estimate $P(a_i\,|\,v_j)$
  1. 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