Question: Given the data set below for the binary class problem. Keep 2 decimal places. ID Attribute A Attribute B Attribute C Class label 1

Given the data set below for the binary class problem. Keep 2 

Given the data set below for the binary class problem. Keep 2 decimal places. ID Attribute A Attribute B Attribute C Class label 1 T F 2 T T T T T T F F 3 4 5 6 7 9 10 F T F T F F F T F 3.5 2.0 6.7 5.5 4.8 2.3 3.7 4.0 5.1 Y Y Y N Y N ZZZZ N N N N (a) Calculate the information gain when splitting on attribute A and B. Which attribute would the decision tree induction algorithm choose? Show all your work. [10] (b) Calculate the reduction in impurity using Gini index when splitting on A and B. Which attribute would the decision tree induction algorithm choose? Show all your work. [10] (c) Compare information gain and Gini index. Explain your results in part (a) and (b). [5] (d) For the attribute C, which is a continuous attribute, describe how you compute the information gain. [5]

Step by Step Solution

3.55 Rating (148 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a To calculate the information gain we first need to calculate the entropy of the class labels and the weighted entropy after splitting on each attribute Entropy of class labels There are 6 positive Y ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!