crossval
Class: ClassificationTree
Cross-validated decision tree
Syntax
cvmodel = crossval(model)
cvmodel = crossval(model,Name,Value)
Description
creates a partitioned model from cvmodel
= crossval(model
)model
, a fitted classification tree.
By default, crossval
uses 10-fold cross validation on
the training data to create cvmodel
.
creates a partitioned model with additional options specified by one or more
cvmodel
= crossval(model
,Name,Value
)Name,Value
pair arguments.
Input Arguments
Output Arguments
Examples
Tips
Alternatives
You can create a cross-validation tree directly from the data, instead of creating a
decision tree followed by a cross-validation tree. To do so, include one of these five
options in fitctree
: 'CrossVal'
,
'KFold'
, 'Holdout'
,
'Leaveout'
, or 'CVPartition'
.