Question: ( b ) Decision tree is a straightforward algorithm and easy to understand in classification problem. Entropy is a measure of purity and it can

(b) Decision tree is a straightforward algorithm and easy to understand in classification
problem. Entropy is a measure of purity and it can be used to calculate the expected
information for an attribute (Fig.3b).
Entropy:
E(S)=-i=1cpilog2pi
where S is training set, pi is the probability of examples in class i, and c is the
number of class labels.
Expected information of an attribute:
E(T,x)=xinx?pxE(x)
where T is the training set, x is the attribute, x is a label in attribute x,px is the
probability of examples in the training set, and E(x) is the entropy of the label of
attribute x.
Fig. 3b
Information gain can determine which attribute is better for being a splitting node by
subtracting the information before and after splitting, i.e. info_gain (T,x)=E(T)-
E(T,x).
Based on the dataset in Table 3, determine the information gain of each input
attribute and suggest which input attribute should be the root node of a decision tree.
Show your steps clearly.
( b ) Decision tree is a straightforward

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!