P(PlayTennis=yes, Outlook=rain, Temperature=mild, Humidity=high, Wind-strong) = P(PlayTennis=no, Outlook=rain, Temperature=mild, Humidity=high, Wind-strong) = P(PlayTennis=yes|Outlook=rain, Temperature=mild, Humidity=high, Wind-strong) = P(PlayTennis-no|Outlook=rain, Temperature=mild, Humidity=high, Wind-strong) = { Will the player play tennis on the given day? ✓ [Choose ] 4/9 = 0.444 0.010 3/5 = 0.60 4/5 = 0.80 0.027 0.73 3/9 = 0.33 NO, will most likely not play 2/5 = 0.4 5/14 = 0.36 0.27 YES, will most likely play today
Using the naive Bayes classifier approach, decide if a person will/will not play tennis on a day that is:
- Outlook=rain
- Temperature=mild
- Humidity=high
- Wind=strong
Use the "PlayTennis" dataset that was used in class (probabilities.pptx).
Calculate the prior probabilities
P(PlayTennis=yes) = 9/14 = 0.64
P(PlayTennis=no) =
Calculate the conditional probabilities
P(Outlook=rain|PlayTennis=yes) =
P(Outlook=rain|PlayTennis=no) =
P(Temperature=mild|PlayTennis=yes) =
P(Temperature=mild|PlayTennis=no) =
P(Humidity=high|PlayTennis=yes) =
P(Humidity=high|PlayTennis=no) =
P(Wind=strong|PlayTennis=yes) =
P(Wind=strong|PlayTennis=no) =
Calculate the joint probabilities (before normalization)
P(PlayTennis=yes, Outlook=rain, Temperature=mild, Humidity=high, Wind=strong) =
P(PlayTennis=no, Outlook=rain, Temperature=mild, Humidity=high, Wind=strong) =
Calculate the conditional probabilities (after normalization)
P(PlayTennis=yes|Outlook=rain, Temperature=mild, Humidity=high, Wind=strong) =
P(PlayTennis=no|Outlook=rain, Temperature=mild, Humidity=high, Wind=strong) =
Based on the above joint probabilities, is the player likely to play tennis on the given day?
Step by step
Solved in 2 steps