Description Usage Arguments Details See Also Examples
Displays the cp
table for fitted itree
object.
Note that cp is not defined for method="purity"
or "extremes"
.
Otherwise identical to rpart's printcp
function.
1 |
x |
fitted model object of class |
digits |
the number of digits of numbers to print. |
Prints a table of optimal prunings based on a complexity parameter. Note that cp is not defined for one-sided methods.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #rpart's examples:
z.auto <- itree(Mileage ~ Weight, car.test.frame)
printcp(z.auto)
## Not run:
Regression tree:
itree(formula = Mileage ~ Weight, data = car.test.frame)
Variables actually used in tree construction:
[1] Weight
Root node error: 1354.6/60 = 22.576
CP nsplit rel error xerror xstd
1 0.595349 0 1.00000 1.03436 0.178526
2 0.134528 1 0.40465 0.60508 0.105217
3 0.012828 2 0.27012 0.45153 0.083330
4 0.010000 3 0.25729 0.44826 0.076998
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.