rpart
objectPrune an rpart
object using the standard error (SE) of the
cross-validation results.
prune_se(object, prune = TRUE, se = 1)
Either an object that inherits from class "rpart"
(ideally,
one that's been simplified using cost-complexity pruning with the 1-SE rule)
or a numeric value representing the cost-complexity parameter to use for
pruning.
An object that inherits from class "rpart"
.
Logical indicating whether or not to return the pruned decision
tree. Default is TRUE
. If FALSE
, the optimal value of the
cost-complexity parameter is returned instead.
Numeric specifying the number of standard errors to use when
pruning the tree. Default is 1
, which corresponds to the 1-SE rule
described in Breiman et al. (1984).
Breiman, L., Friedman, J., and Charles J. Stone, R. A. O. (1984). Classification and Regression Trees. The Wadsworth and Brooks-Cole statistics-probability series. Taylor & Francis.