about the arbitary parameter in naive bayes classifier?

416 Views Asked by At

In the car theft example given at the below link, why did we go with m=3?

http://www.inf.u-szeged.hu/~ormandi/ai2/06-naiveBayes-example.pdf

This example there is a database for a car and it has following attributes - color, type, origin. The dataset simply shows us the relation ship between how the cars, these attributes, and whether they end up to be stolen or not.

The problem statement is to determine if a Red Domestic SUV car will get stolen or not.

The computations shown in the document are summarized as follows:

  1. They take the positive case i.e. a car which is red, domestic, and suv...and get a probability. This is finally multiplied by the probability that the car will get stolen.

  2. The take the negative case...and in a similar fashion arrive at a probability value. This is finally multiplied by the probability the car will not get stolen.

The max of the above two values are used to determine if the car will get stolen or not...

But in the above two computations they use a formula:

$$ P(a_i|v_j)= \frac{n_c + mp}{n+m} $$

The explanation for the parameters are as follows:

$n =$ the number of training examples for which $v = v_j$

$n_c =$ number of examples for which $v = v_j$ and $a = a_i$

$p =$ a priori estimate for $P(a_i|v_j)$

$m =$ the equivalent sample size

In the samples they use the value $m=3$...I don't get this part...