prune
Produce sequence of classification subtrees by pruning
Description
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 a tree1
= prune(tree
,Name,Value
)Name,Value
pair argument. You can only use one option at a time.
Examples
Input Arguments
Tips
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.
Extended Capabilities
Version History
Introduced in R2011a