Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

For Naive Bayes, how do I test if my distributions are valid?

0
Posted

For Naive Bayes, how do I test if my distributions are valid?

0

You know this! Think about it for a second. What is a valid distribution? Sums to 1, right? Thus, you need to make sure that the total probability mass assigned by any probability distribution you learn sums to 1! For NB, you have two distributions: the prior over labels P(Y) and the posterior or conditional over features given the label P(W | Y). In the vase of the vanilla NB, validity should be guaranteed by proper implementation with the Counter and CounterMap classes. Validity becomes more of an issue for your feature conditionals when you use smoothing to give mass to unseen events. Anyway, in short, for each distribution you learn, sum over all the probabilities for all possible events and see if that sum equals (or is very close to) 1.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123