Description Usage Arguments Value See Also Examples
Determines a nested sequence of subtrees of the supplied itree
object
by recursively snipping
off the least important splits, based on the
complexity parameter (cp
). Identical to prune.rpart
.
1 2 3 4 |
tree |
fitted model object of class |
cp |
Complexity parameter to which the |
... |
further arguments passed to or from other methods. |
A new itree
object that is trimmed to the value cp
.
1 2 3 4 | #the rpart example:
z.auto <- itree(Mileage ~ Weight, car.test.frame)
zp <- prune(z.auto, cp=0.1)
plot(zp) #plot smaller itree object
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.