P(PlayTennis=yes, Outlook=rain, Temperature=mild, Humidity=high, Wind=strong) = [Choose ] P(PlayTennis=no, Outlook=rain, Temperature=mild, [Choose ] Humidity=high, Wind=strong) = P(PlayTennis=yes|Outlook=rain, Temperature=mild, [Choose ] Humidity=high, Wind=strong) = P(PlayTennis-no|Outlook=rain, Temperature=mild, [Choose ] Humidity=high, Wind-strong) = { Will the player play tennis on the given day? [Choose ]
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 with 2 images