You are on page 1of 2

SWE 485 - Assignment 2

Supervised Learning: Decision Trees

Question #1:

The following table shows a game which is played or not depending on the weather conditions (Actual).
There are three attributes: outlook (sunny / overcast / rainy), humidity (high / normal) and windy (true /
false). Also, it shows a predictive model results for these attributes (Predicted).

Outlook Humidity Windy Play? (Actual) Play? (Predicted)


sunny high false No Yes
sunny high true No No
overcast high false Yes No
rainy high false Yes Yes
rainy normal false Yes Yes
rainy normal true No No
overcast normal true Yes No
sunny high false No No
sunny normal false Yes Yes
rainy normal false Yes Yes
sunny normal true Yes No
overcast high true Yes Yes
overcast normal false Yes Yes
rainy high true No Yes

1- Build a decision tree for the dataset above (the output is “Actual” column), using Entropy
evaluation and Information Gain for branching decisions. Show your calculations.
2- Considering “Predicted” and “Actual” columns in the table above, construct a confusion matrix,
and measure the accuracy, precision and recall of these classifications.
Question #2:

1- Build a decision tree for the data below:

2- Classify the following three points using your decision tree.


(0.48, 0.95)
(0.6, 1.0)
(0.6, 0.3)

You might also like