prune: Conduct cost-complexity pruining to obtain ideal tree size
Description
This function conduct a cost-complexity pruning in order to obtain ideal tree size.Usage
## S3 method for class 'Tree':
prune(treeres, K = 10,
cost = function(y, yhat, status) sum(abs(y - yhat) * status))
Arguments
treeres
object of S4 class Tree.
K
The number of partitions