Removes all nodes that did not improve the loss by more than cp times the initial loss.
Either by themselves or by one of their successors. Note that the tree is pruned in place.
If you intend to keep the original tree, make a copy of it before pruning.
Usage
# S3 method for SDTree
prune(object, cp, ...)
Value
A pruned SDTree object
Arguments
object
an SDTree object
cp
Complexity parameter, the higher the value the more nodes are pruned.
...
Further arguments passed to or from other methods.