How to handle a zero factor in Naive Bayes Classifier calculation?
An approach to overcome this 'zero frequency problem' in a Bayesian setting is to add one to the count for every attribute value-class combination when an attribute value doesn’t occur with every class value. So, for example, say your training data looked like this:

$$\begin{array}{c|c|c|} 
 &amp; \text{Spam} = yes &amp; \text{Spam} = no \\ \hline
\text{TimeZone} = US &amp; 10 &amp; 5 \\ \hline
\text{TimeZone} = EU &amp; 0 &amp; 0 \\ \hline
\end{array}$$

$ P(\text{TimeZone} = US | \text{Spam} = yes) = \frac{10}{10} = 1$

$P(\text{TimeZone} = EU | \text{Spam} = yes) = \frac{0}{10} = 0$

Then you should add one to every value in this table when you're using it to calculate probabilities:

$$\begin{array}{c|c|c|} 
 &amp; \text{Spam} = yes &amp; \text{Spam} = no \\ \hline
\text{TimeZone} = US &amp; 11 &amp; 6 \\ \hline
\text{TimeZone} = EU &amp; 1 &amp; 1 \\ \hline
\end{array}$$

$ P(\text{TimeZone} = US | \text{Spam} = yes) = \frac{11}{12}$

$P(\text{TimeZone} = EU | \text{Spam} = yes) = \frac{1}{12}$