| plot.tree.sequence(tree) | R Documentation |
Allows the user to plot a tree sequence.
plot.tree.sequence(x, ..., order=c("increasing", "decreasing"))
x |
object of class tree.sequence.
This is assumed to be the result of some function that produces
an object with the same named components (size, deviance, k)
as that returned by prune.tree() and shrink.tree().
|
order |
of size on the plot. Use "decreasing" for the natural ordering of k
and the amount of pruning. Only the first character is needed.
|
This function is a method for the generic function
plot() for class tree.sequence.
It can be invoked by calling plot(x) for an
object x of the appropriate class, or directly by
calling plot.tree.sequence(x) regardless of the
class of the object.
plots deviance or number of misclassifications (or total loss) versus size for a sequence of trees.
library(MASS) data(cpus) cpus.ltr <- tree(log(perf) ~ syct+mmin+mmax+cach+chmin+chmax, cpus) plot(prune.tree(cpus.ltr))