October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to prune the classification tree:
> min(churn.rp$cptable[,"xerror"])
Output
[1] 0.4707602
> which.min(churn.rp$cptable[,"xerror"])
Output
7
> churn.cp = churn.rp$cptable[7,"CP"]
> churn.cp
Output
[1] 0.01754386
> prune.tree = prune(churn.rp, cp= churn.cp)
> plot(prune.tree, margin= ...
Read now
Unlock full access