Examples for 'rpart::prune.rpart'


Cost-complexity Pruning of an Rpart Object

Aliases: prune.rpart prune

Keywords: tree

### ** Examples

z.auto <- rpart(Mileage ~ Weight, car.test.frame)
zp <- prune(z.auto, cp = 0.1)
plot(zp) #plot smaller rpart object
plot of chunk example-rpart-prune.rpart-1

[Package rpart version 4.1.19 Index]