IAE Academy

GATE 2024 DA Q.62: solution and answer

GATE 2024 · DAQ.62 · 2 marks · NAT

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).

GATE 2024 DA question 62: Table C with columns Match Number, Pitch, Format, Winner (Target).Tap to open full size
Figure from the GATE 2024 DA paper. It is part of the question.
Figure description

Table C with columns Match Number, Pitch, Format, Winner (Target). Rows: 1 S T Green; 2 S T Blue; 3 F O Blue; 4 S O Blue; 5 F T Green; 6 F O Blue; 7 S O Green; 8 F T Blue; 9 F O Blue; 10 S O Green.

Answer and solution

ANSWER

The information gain of splitting on Pitch is about 0.12.

Official answer: 0.12 to 0.13Source: Official answer key, GATE 2024 DA (IISc Bengaluru)

  1. Count the target over all 10 matches. Green won matches 1, 5, 7 and 10, which is 4 matches. Blue won the other 6. So and .

  2. Entropy of the target: .

  3. Split on Pitch. Pitch holds matches 1, 2, 4, 7 and 10 with winners G, B, B, G, G, so 3 Green and 2 Blue. Pitch holds matches 3, 5, 6, 8 and 9 with winners B, G, B, B, B, so 1 Green and 4 Blue.

  4. .

  5. .

  6. Each branch holds 5 of the 10 matches, so the weighted child entropy is .

KEY IDEA

Information gain is the parent's entropy minus the size-weighted average entropy of the children. Count the class split in the whole table and in each Pitch branch, then compute the binary entropies.

WATCH OUT FOR

Using the wrong class counts per branch, for example miscounting the Green wins on pace-friendly pitches. Another slip is forgetting to weight each branch by its share of the matches, or using natural log instead of base 2.

From the GATE 2024 DA paper. Every question of this paper · Download the full paper · All 7 LDA, SVM & trees questions, with notes

More LDA, SVM & trees questions