tree
and
tree.sequence
Objects of class
"tree"
are created by the
tree
function.
Objects of class
"tree.sequence"
are the result of operations
to a tree to make it smaller; they may be made by either
prune.tree
or
shrink.tree
.
Generic functions that have methods for class
"tree"
are:
[
,
browser
,
deviance
,
identify
,
labels
,
plot
,
predict
,
print
,
residuals
,
summary
,
text
.
Generic functions with methods for
"tree.sequence"
are:
plot
.
The
shrink.tree
function produces either an object with class
c("bonzai", "tree")
or with class
c("shrink", "tree.sequence")
.
The following components must be included in a legitimate
tree
object.
Of these, only the
where
component has the same length as
the data used to fit the tree object.
row.names
of
frame
contain the (unique) node numbers that
follow a binary ordering indexed by node depth.
Elements of
frame
include
var
,
the variable used in the split at each node
(leaf nodes are denoted by the string n
, the size of each node,
dev
, the deviance of each node,
yval
, the fitted value of the response at each node,
splits
, a two column matrix of left and right split labels
for each node.
Classification trees have an additional element
yprob
,
the matrix containing the class probabilities for each node.
frame
corresponding to the leaf node
that each observation falls into.
expression
and class
term
summarizing the formula.
Used by various methods, but typically not of direct relevance to users.
update(tree)
.
"tree.sequence"
is: