shrink.tree(tree, k=(1:10)/(20:11), newdata)
Otherwise, an object of class tree.sequence is returned. The object contains the following components:
z.auto <- tree(Mileage ~ Weight, car.test.frame) zs <- shrink.tree(z.auto) # determine the optimal shrinking sequence plot(zs) znew <- shrink.tree(z.auto, k=.4) # select a specific shrunken tree in the sequence