Select Parameters for Tree
Usage
tree.control(nobs, mincut=5, minsize=10, mindev=0.01)
Arguments
nobs
|
The number of observations in the training set.
|
mincut
|
The minimum number of observations to include in either
child node. This is a weighted quantity; the observational weights are used
to compute the `number'. The default is 5.
|
minsize
|
The smallest allowed node node: a weighted quantity. The
default is 10.
|
mindev
|
The within-node deviance must be at least this times that
of the root node for the node to be split.
|
Description
The produces default values of mincut
and minsize
, and
ensures that mincut
is at least half minsize
.
To produce a tree that perfectly fits the data, set mindev=-1
and minsize = 2
.
Value
A list
mincut
|
The maximum of the input or default mincut and 1
|
minsize
|
The maximum of the input or default minsize and 2.
|
nmax
|
A estimate of the maximum number of nodes that might be grown.
|
nobs
|
The input nobs .
|
Author(s)
B.D. RipleySee Also
tree