Solved – What if a numerator term is zero in Naive Bayes

I'm trying to predict the probability that a user will visit a particular website based on several factors (day of the week, time since last visit, etc). My question is what to do if one of the numerator terms goes to zero?

For instance, suppose I visit www.google.com often, but I've never visited on a Monday. $p(Monday|google)$ is zero. Do I simply remove this term from the equation altogether?

One method to deal with this is to increment all counts by 1. This is known as Laplace smoothing. If you Google Laplace smoothing and Naive Bayes you will find many references.

Similar Posts:

Rate this post

Leave a Comment