0% found this document useful (0 votes)
25 views

SWE485 - Assignment 2 - 45-2

This document provides instructions for two questions regarding supervised learning decision trees. The first question asks to build a decision tree model to predict if a game will be played using weather attribute data, and then evaluate the model's accuracy, precision, and recall. The second question asks to build a decision tree for other sample data and use it to classify three additional data points.

Uploaded by

lay22n
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

SWE485 - Assignment 2 - 45-2

This document provides instructions for two questions regarding supervised learning decision trees. The first question asks to build a decision tree model to predict if a game will be played using weather attribute data, and then evaluate the model's accuracy, precision, and recall. The second question asks to build a decision tree for other sample data and use it to classify three additional data points.

Uploaded by

lay22n
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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