Naive Bayes Laplace Estimator question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Naive Bayes Laplace Estimator question

Terry Letsche
Hi.

I'm working through some examples from the book, and I have a question.

Say I have a data set with five nominal attributes, and I want to use
naive bayes. Counts on two of the attributes' values are zero.

Do I use the Laplace estimator on JUST those two attributes, do I use
it on all the attributes, or should I always use it, whether there are
any zeroes or not?

Thanks.

Terry
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Naive Bayes Laplace Estimator question

Eibe Frank-2
Administrator
You can get away without it in that case but it can help to prevent overfitting. Really, the amount you add per attribute value (e.g., 1 in the standard Laplace correction) should be tuned using internal cross-validation. Having said this, if you have lots of data for each attribute value, the effect of any correction should be minimal.

Cheers,
Eibe

> On 17/02/2017, at 12:07 PM, Terry Letsche <[hidden email]> wrote:
>
> Hi.
>
> I'm working through some examples from the book, and I have a question.
>
> Say I have a data set with five nominal attributes, and I want to use
> naive bayes. Counts on two of the attributes' values are zero.
>
> Do I use the Laplace estimator on JUST those two attributes, do I use
> it on all the attributes, or should I always use it, whether there are
> any zeroes or not?
>
> Thanks.
>
> Terry
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html