treepruner function

Prune a tree

Prune a tree

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

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().

Returns

The pruned tree

  • Maintainer: Juan Claramunt
  • License: GPL (>= 2)
  • Last published: 2020-07-10

Useful links