treepruner: Prune a tree

View source: R/fe_prune_Support.R

treeprunerR Documentation

Prune a tree

Description

Prune an initial rpart tree by "c-standard-error" rule.

Usage

treepruner(tree, c, ...)

Arguments

tree

A initial tree fitted by rpart, needs to an rpart object.

c

A scalar to prune the tree by selecting the tree with minum cross-validation error plus the standard error multiplied by c.

...

Additional arguments passed to prune.rpart().

Value

The pruned tree


metacart documentation built on June 8, 2025, 12:46 p.m.