Decision Trees Example
Decision Trees Example
Langua
ge
Literacy
P
F
A
F
P
P
F
P
A
P
F
A
A
F
A
P
F
A
P
A
P
F
P
P
F
A
A
F
F
A
Deducti
ve
Reasoni
ng
P
P
P
P
F
P
F
P
F
P
P
P
F
P
F
Abstract
Reasonin
g
P
P
P
P
P
P
F
F
P
P
P
F
P
P
F
Inductiv
e
Reasoni
ng
P
F
P
F
P
F
F
F
F
P
P
P
P
P
F
Hired
Departm
ent
Y
N
Y
N
Y
Y
N
Y
N
Y
Y
Y
N
Y
N
Audit
ICS
Audit
Tax
Advisory
Audit
ICS
Tax
ICS
KEY
P Pass, A Average, F Fail
NB: The numeric and language section of the test is graded as pass, average or fail
while the reasoning sections are graded in as pass or fail only.
Entropy (S) =
c Pi log2 Pi
i=1
n |SAi|/|S| Entropy(SAi)
i=1
(Y=5, N=0)
(Y=2, N=3)
(Y=2, N=3)
Gain (NumericTest, S)
= 0.971 ( (5/15 ((0) + (0))) + (5/15((-2/5log22/5) + (-3/5log23/5))) + (5/15((2/5log22/5) + (-3/5log23/5))) )
(Y=3, N=2)
(Y=4, N=1)
(Y=2, N=3)
Gain (LanguageTest, S)
= 0.971 ( (5/15 ((-3/5log23/5) + (-2/5log22/5))) + (5/15 ((-4/5log24/5) + (1/5log21/5))) + (5/15((-2/5log22/5) + (-3/5log23/5))) )
= 0.971 - {[0.3333(0.4422+0.5288)] + [0.3333(0.2575+0.4644)] +
[0.3333(0.5288+0.4422)]}
= 0.0832
Deductive Reasoning
DeductiveTest, Pass
DeductiveTest, Fail
(Y=8, N=2)
(Y=1, N=4)
Gain (DeductiveTest, S)
= 0.971 ( (10/15 ((-8/10log28/10) + (-2/10log22/10))) + (5/15 ((-1/5log21/5) + (4/5log24/5))) )
= 0.971 - {[0.6667(0.2575+0.4644)] + [0.3333(0.4644+0.2575)]}
=0.2491
Abstract Reasoning
AbstractTest, Pass
AbstractTest, Fail
(Y=5, N=0)
(Y=2, N=3)
Gain (AbstractTest, S)
= 0.971 ( (11/15 ((0) + (0))) + (4/15((-2/5log22/5) + (-3/5log23/5))) )
=0.971 - {[0] + [0.2667(0.5288+0.4422)]}
=0.712
Inductive Reasoning
InductiveTest, Pass
InductiveTest, Fail
(Y=7, N=1)
(Y=2, N=5)
Gain (InductiveTest, S)
= 0.971 ( (8/15 ((-7/8log27/8) + (-1/8log21/8))) + (7/15((-2/7log22/7) + (5/7log25/7))) )
= 0.971 - {[0.5333(0.1685+0.375)] + [0.4667(0.5164+0.3467)]}
= 0.2784
From the gains calculated, the decision tree will be of the form:
0.712 -> 0.3238 -> 0.2784 -> 0.2491 -> 0.0832
Abstract Reasoning
|
V
Numeric Test
|
V
Inductive Reasoning
|
V
Deductive Reasoning
|
V
Language Literacy