pruning decision tree using cp

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?

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.

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