The GATE Grind

GATE 2024 DA – Question 62

Machine Learning · Supervised learning: classification · 2 marks · Numerical answer

Details of ten international cricket games between two teams "Green" and "Blue" are given in Table C. This table consists of matches played on different pitches, across formats along with their winners. The attribute Pitch can take one of two values: spin-friendly (represented as $S$) or pace-friendly (represented as $F$). The attribute Format can take one of two values: one-day match (represented as $O$) or test match (represented as $T$).

A cricket organization would like to use the information given in Table C to develop a decision-tree model to predict outcomes of future games between these two teams. To develop such a model, the computed InformationGain(C, Pitch) with respect to the Target is ______ (rounded off to two decimal places).

Match NumberPitchFormatWinner (Target)
1STGreen
2STBlue
3FOBlue
4SOBlue
5FTGreen
6FOBlue
7SOGreen
8FTBlue
9FOBlue
10SOGreen

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 0.11 to 0.13

Explanation

Green wins 4 of the 10 matches, so the entropy of the target is $H = -0.4\log_2 0.4 - 0.6\log_2 0.6 = 0.971$. For $Pitch = S$ (matches 1, 2, 4, 7, 10) Green wins 3 of 5, so the entropy is $H(0.6, 0.4) = 0.971$. For $Pitch = F$ (matches 3, 5, 6, 8, 9) Green wins 1 of 5, so the entropy is $H(0.2, 0.8) = 0.722$. The weighted entropy after the split is $0.5 \times 0.971 + 0.5 \times 0.722 = 0.846$. The information gain is $0.971 - 0.846 = 0.125$, which is about 0.12.