How to compute the complexity parameter α?: Study Notes of CART
How to compute the complexity parameter α?: Study Notes of CART
R(t) − R(Tt )
α=
|T̃ | − 1
Proof:
Recall that the definition: Rα (T ) = R(T ) + α|T̃ |, and Tt is a branch including node
t. For any single node t ∈ T , we have
1
⇒ (T̃t − 1) · α = R(t) − R(Tt )
R(t) − R(Tt )
⇒α=
|T̃ | − 1
as desired.
Example:
This example will simply show how to calculate the complexity parameter α (see
Figure 1 below). The data set has 2 classes say A, B, and 200 samples in all. T1 is a
subtree of the whole tree T , there are 5 terminal nodes in T1 , say t5 , t6 , t7 , t8 , and t9 .
2
R(t4 ) − R(Tt4 ) 2/200 − 0
α(T1 (t4 )) = = = 1/100
2−1 1
α(T1 (t4 )) is the first value of α since it obtains the lowest value. That is, we prune
the tree below the node t4 . After this a new iteration should be used as before and
the tree will be pruned once again.