pruning decision tree using cp


#1

tree$cptable[which.min(tree$cptable[,"xerror"]),"CP"]

why is the "CP" outside the bracket of which.min?

I think we want to choose the split with the minimum xerror, and factor in the lowest CP?


#2

The traditional method for pruning CART trees is to get the simplest tree within one SE of the numerically best.

I tend to favor the best error but YMMV.


#3

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.