Class: ClassificationTree
Produce sequence of classification subtrees by pruning
tree1 = prune(tree)
tree1 = prune(tree,Name,Value)
creates
a copy of the classification 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 classification tree created with |
Specify optional
comma-separated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
|
A numeric scalar. |
|
A numeric scalar from |
|
A numeric vector with elements from |
|
A classification 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 the fitctree
function 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.