Question: Decision Tree ] You will build a decision tree to determine whether or not a child goes out to play. Day Weather Temperature Humanity Wind
Decision Tree You will build a decision tree to determine whether or not a child goes out to
play.
Day Weather Temperature Humanity Wind Play
Sunny Hot High Weak No
Cloudy Hot High Weak Yes
Sunny Mild Normal Strong Yes
Cloudy Mild High Strong Yes
Rainy Mild High Strong No
Rainy Cool Normal Strong No
Rainy Mild High Weak Yes
Sunny Hot High Strong No
Cloudy Hot Normal Weak Yes
Rainy Mild High Strong No
Calculate the information gain for each feature and select the feature with the highest infor
mation gain to serve as the root of the decision tree. Draw a root and split the ten training data
points into two groups based on the value of the selected root feature.
k arg max
k
IXk; Y HY HY Xk
Repeat the two procedures: selecting a feature and splitting the data points until the
leaf nodes of the tree achieve complete purity.
Extra Points: points Try pruning your tree. You need to find a subtree T minimizing
the criterion CT below. Based on the criterion computation, do you think we need to prune the
tree found in
CT
T
X
Q num of leaves in T
Q entropy of a leaf in T measure of impurity
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
