ClassificationPartitionedLinear
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. You can estimate the quality of
classification, or how well the linear classification model generalizes, using one or
more kfold functions: kfoldPredict
, kfoldLoss
, kfoldMargin
, and kfoldEdge
.
Every kfold object function uses models trained on training-fold (in-fold) observations to predict the response for validation-fold (out-of-fold) observations. For example, suppose that you cross-validate using five folds. The software randomly assigns each observation into five groups of equal size (roughly). The training fold contains four of the groups (roughly 4/5 of the data), and the validation fold contains the other group (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}
) by using the observations in the last four groups, and reserves the observations in the first group for validation.The software trains the second model (stored in
CVMdl.Trained{2}
) by using the observations in the first group and the last three groups. The software reserves the observations in the second group for validation.The software proceeds in a similar manner for the third, fourth, and fifth models.
If you validate by using kfoldPredict
, the software computes
predictions for the observations in group i by using model
i. In short, the software estimates a response for every
observation by using the model trained without that observation.
Note
ClassificationPartitionedLinear
model objects do not store the
predictor data set.
Creation
You can create a ClassificationPartitionedLinear
object by using the
fitclinear
function and specifying one of
the name-value arguments CrossVal
,
CVPartition
, Holdout
,
KFold
, or Leaveout
.
Properties
Object Functions
kfoldEdge | Classification edge for cross-validated linear classification model |
kfoldLoss | Classification loss for cross-validated linear classification model |
kfoldMargin | Classification margins for cross-validated linear classification model |
kfoldPredict | Classify observations in cross-validated linear classification model |
Examples
Extended Capabilities
Version History
Introduced in R2016aSee Also
ClassificationLinear
| fitclinear
| kfoldPredict
| kfoldLoss