2
$\begingroup$

I've been working with trying to understand and explain how Naive Bayes classifier works with the adjusted (prior and posterior) probabilities, and wanted to show my example to ensure I'm executing it correctly. Here is the data:

Data

 Name     |  Art Fair  | Fishing  | Shovel Snow  | Wedding
 Jon         No          Yes        Yes            No
 Jane        Yes         Yes        No             Yes
 Jill        Yes         Yes        Yes            Yes

Art Fair (AF) & Wedding (W)

 P(both AF & W/just AF) = 2/2 = 100%
 P( (total user either-both AF & W)/total) = (2-2)/2 = 0%
 Normalize Probability = 100% / (100% + 0%) = 100%  

Fishing (F) & Wedding (W)

 P(both F & W/just F) = 2/3 = 67%
 P( (total user either-both F & W)/total) = (3-2)/3 = 33%
 Normalize Probability = 67% / (67% + 33%) = 67%  

Shovel Snow (SS) & Wedding (W)

 P(both SS & W/just SS) = 1/2 = 50%
 P( (total user either-both SS & W)/total) = (3-1)/3 = 66%
 Normalize Probability = 50% / (50% + 66%) = 43%  

Would it be accurate that based on the data, I'm calculating the posterior probability (normalized probability) correctly?

$\endgroup$
1
  • $\begingroup$ Please write more explicit titles. $\endgroup$ Commented Dec 26, 2016 at 3:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.