Player Batting Bowling Fielding Selected ---------------------------------------- 1 Amazing Spinner Outfield Selected 2 OK Fast Outfield Left-out 3 Useless Spinner Outfield Selected 4 Amazing Spinner Wickie Left-out 5 Amazing Fast Outfield Selected 6 OK Fast Outfield Left-out 7 OK Fast Outfield Left-out 8 Amazing Spinner Close-in Selected 9 Amazing Fast Close-in Selected 10 Useless Fast Wickie Left-outEntropy = 1.0
Batting
Entropy(Amazing) = -0.8*log2(0.8) -0.2*log2(0.2) = 0.722
Entropy(OK) = 0.0
Entropy(Useless) = 1.0
Entropy(Batting) = 0.5 * 0.722 + 0.2 * 1= 0.561
InfoGain(Batting) = 1.0 - 0.561 = 0.439
Bowling
Entropy(Fast) = -0.333*log2(0.333) - 0.666*log2(0.666) = 0.918
Entropy(Spinner) = -0.75*log2(0.75) -0.25*log2(0.25) = 0.811
Entropy(Bowling) = 0.6 * 0.918 + 0.4 + 0.811 = 0.875
InfoGain(Bowling) = 1.0 - 0.875 = 0.125
Fielding
Entropy(Wickie) = 0.0
Entropy(Close-in) = 0.0
Entropy(Outfield) = 1.0
Entropy(Fielding) = 0.6 * 1.0 = 0.6
InfoGain(Fielding) = 1.0 - 0.6 = 0.4
Batting is best with remaining entropy 0.561
Amazing:Bowling
Entropy(Fast) = 0.0
Entropy(Spinner) = -0.666*log2(0.666) -0.333*log2(0.333) = 0.918
Entropy(Amazing:Bowling) = 0.6 * 0.918 = 0.551
InfoGain(Amazing:Bowling) = 0.722 - 0.551 = 0.171
Amazing:Fielding
Entropy(Wickie) = 0.0
Entropy(Close-in) = 0.0
Entropy(Outfield) = 0.0
Entropy(Amazing:Fielding) = 0.0
InfoGain(Amazing:Fielding) = 0.722 - 0.0 = 0.722
Fielding is best for Amazing with remaining entropy 0.0
Useless:Bowling
Entropy(Fast) = 0.0
Entropy(Spinner) = 0.0
Entropy(Useless:Bowling) = 0.0
InfoGain(Useless:Bowling) = 1.0 - 0.0 = 1.0
Bowling is best for Useless with remaining entropy 0.0.
(But Fielding would also work.)
No more needed. The decision tree is:
Batting / | \ Amazing/ OK| \Useless / | \ Fielding Left-out Bowling / | \ | \ Wickie/ Cl-|in \Outfield |Fast \Spinner / | \ | \ Left-out Selected Selected Left-out Selected