Class: RegressionTree
Produce sequence of regression subtrees by pruning
tree1 = prune(tree)
tree1 = prune(tree,Name,Value)
creates
a copy of the regression tree tree1
= prune(tree
)tree
with its optimal
pruning sequence filled in.
creates
a pruned tree with additional options specified by one tree1
= prune(tree
,Name,Value
)Name,Value
pair
argument. You can specify several name-value pair arguments in any
order as Name1,Value1,…,NameN,ValueN
.
|
A regression tree created with |
Optional comma-separated pair of Name,Value
arguments,
where Name
is the argument name and Value
is
the corresponding value. Name
must appear inside
single quotes (''
). You can specify only one name-value
pair argument.
|
A numeric scalar from |
|
A numeric scalar from |
|
A numeric vector with elements from |
|
A regression tree. |
tree1 = prune(tree)
returns the
decision tree tree1
that is the full, unpruned tree
,
but with optimal pruning information added. This is useful only if
you created tree
by pruning another tree, or by
using fitrtree
with pruning set 'off'
.
If you plan to prune a tree multiple times along the optimal pruning
sequence, it is more efficient to create the optimal pruning sequence
first.