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.arbor(tree, cp)
REQUIRED 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.
OPTIONAL ARGUMENTS:
cp
Complexity parameter to which the
arbor object will be trimmed. The default value is zero, which will return the full tree.
VALUE:
A new
arbor object that is trimmed to the value
cp.