ClassificationPartitionedLinear
Namespace: classreg.learning.partition
Superclasses: ClassificationPartitionedModel
Cross-validated linear model for binary classification of high-dimensional data
Description
ClassificationPartitionedLinear
is a set of linear
classification models trained on cross-validated folds. To obtain a cross-validated,
linear classification model, use fitclinear
and specify one of the cross-validation options. You can
estimate the quality of classification, or how well the linear classification model
generalizes, using one or more of these “kfold” methods: kfoldPredict
, kfoldLoss
, kfoldMargin
, and kfoldEdge
.
Every “kfold” method uses models trained on in-fold observations to predict the response for out-of-fold observations. For example, suppose that you cross-validate using five folds. In this case, the software randomly assigns each observation into five roughly equally sized groups. The training fold contains four of the groups (that is, roughly 4/5 of the data) and the test fold contains the other group (that is, roughly 1/5 of the data). In this case, cross-validation proceeds as follows:
The software trains the first model (stored in
CVMdl.Trained{1}
) using the observations in the last four groups and reserves the observations in the first group for validation.The software trains the second model, which is stored in
CVMdl.Trained{2}
, using the observations in the first group and last three groups. The software reserves the observations in the second group for validation.The software proceeds in a similar fashion for the third through fifth models.
If you validate by calling kfoldPredict
, it computes predictions for
the observations in group 1 using the first model, group 2 for the second model, and so
on. In short, the software estimates a response for every observation using the model
trained without that observation.
Note
ClassificationPartitionedLinear
model objects do
not store the predictor data set.
Construction
CVMdl = fitclinear(X,Y,Name,Value)
creates a cross-validated,
linear classification model when Name
is either
'CrossVal'
, 'CVPartition'
,
'Holdout'
, or 'KFold'
. For more details, see
fitclinear
.
Properties
Methods
kfoldEdge | Classification edge for observations not used for training |
kfoldLoss | Classification loss for observations not used in training |
kfoldMargin | Classification margins for observations not used in training |
kfoldPredict | Predict labels for observations not used for training |
Copy Semantics
Value. To learn how value classes affect copy operations, see Copying Objects.
Examples
Extended Capabilities
Version History
Introduced in R2016aSee Also
ClassificationLinear
| fitclinear
| kfoldPredict
| kfoldLoss