prune.arbor
Cost-complexity Pruning of an Arbor Object

Description

Determines a nested sequence of subtrees of the supplied arbor object by recursively snipping off the least important splits, based on the complexity parameter (cp).

Usage

prune(tree, ...)

Arguments

tree fitted model object of class arbor. This is assumed to be the result of some function that produces an object with the same named components as that returned by the arbor function.
... additional arguments.
Value
returns a new arbor object that is trimmed to the value cp.
See Also
arbor
Examples
library("arbor")
data(car.test.frame, package = "Sdatasets")
z.auto <- arbor(Mileage ~ Weight, car.test.frame)
zp <- prune.arbor(z.auto, cp = 0.03) 
z.auto
zp
Package arbor version 6.1.1-7
Package Index