please provide detailed solution..
a) Sine we have 4 attributes we need to find probability of the game tennis played based on each attribute. So for aech attribute a table is to be constructed. Also from the data there are 5 cases where game can't be played and 9 cases where the game can be played.
OUTLOOK |
Play=Yes |
Play=No |
Total |
Sunny |
2/9 |
3/5 |
5/14 |
Overcast |
4/9 |
0/5 |
4/14 |
Rain |
3/9 |
2/5 |
5/14 |
Since temperature is numeric values we need to deiscretize it as High,Medium,Low such that
temp 60-70 low
temp 70-80 medium
temp 80-90 high
TEMPERATURE |
Play=Yes |
Play=No |
Total |
Low |
3/9 |
1/5 |
4/14 |
Medium |
4/9 |
2/5 |
6/14 |
High |
2/9 |
2/5 |
4/14 |
The same thing nedd to do in th case of humidity
humidity 60-70 Low4/
humdity 70-80 Medium
humidity 80 above High
HUMIDITY |
Play=Yes |
Play=No |
Total |
Low |
1/9 |
0/5 |
1/14 |
Medium |
4/9 |
1/5 |
5/14 |
High |
4/9 |
4/5 |
8/14 |
WIND |
Play=Yes |
Play=No |
Total |
Weak |
6/9 |
2/5 |
8/14 |
Strong |
3/9 |
3/5 |
6/14 |
Also P(Play=Yes)=9/14 and P(play=No)=5/14
Now we have gathered all information for the calssifier.In the next step we can test it using test cases
1. X = (Outlook=Rain, Temperature=Low, Humidity=High, Wind=Weak)
from the table
Next we consider the fact that we cannot play a game:
P(X|Play=Yes)P(Play=Yes) =(3/9) * (3/9) * (4/9) * (6/9) * (9/14) = 0.0211
P(X|Play=No)P(Play=No) = (2/5) * (1/5) * (4/5) * (2/5) * (5/14) = 0.0091
Finally, we have to divide both results by the evidence
Then, dividing the results by this value
§ P(Play=Yes | X) = 0.0211/0.033 = 0.6393
§ P(Play=No | X) = 0.0091/0.033= 0.2757
Since Play=Yes has the highest value we can play tennis in this case
please provide detailed solution.. Page 4 of S Exercise 2. Weather Prediction Using Bayes Classifier 15...
For the tennis data in (above): Suppose that every outlook=sunny had been always associated with play= no (i.e. outlook=sunny had never occurred together with play=yes). With this new training set (Below), predict the class of the following new example using Naïve Bayes classification outlook humidity windy play temperature 85 85 false sunny no 80 90 sunny true no 83 overcast 86 false yes rainy 70 false 96 yes rainy 68 false 80 yes rainy 65 70 true no 64 65...