The Second Iteration for Information Gain (Cont.)


Then, we repeat the procedure of computing degree of impurity and information gain for the three attributes. The results of computation are exhibited below.


For example, the information gains of attribute “Gender” based on entropy, Gini index, and classification error are given below.
Entropy:
0.722 – (2/5×1.000 + 3/5×0.000) = 0.322
Gini index:
0.320 – (2/5×0.500 + 3/5×0.000) = 0.120
Classification error:
0.200 – (2/5×0.500 + 3/5×0.000) = 0.000



      Teamwork and training will carry the day (successful).