Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

**Package: **classreg.learning.partition

**Superclasses: **`ClassificationPartitionedModel`

Cross-validated linear error-correcting output codes model for multiclass classification of high-dimensional data

`ClassificationPartitionedLinearECOC`

is a set of
error-correcting output codes (ECOC) models composed of linear classification models,
trained on cross-validated folds. Estimate the quality of classification by
cross-validation using one or more “kfold” functions: `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 equal-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 (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, fourth, and 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.

`ClassificationPartitionedLinearECOC`

model
objects do not store the predictor data set.

`CVMdl = fitcecoc(X,Y,'Learners',t,Name,Value)`

returns a
cross-validated, linear ECOC model when:

`t`

is`'Linear'`

or a template object returned by`templateLinear`

.`Name`

is one of`'CrossVal'`

,`'CVPartition'`

,`'Holdout'`

, or`'KFold'`

.

For more details, see `fitcecoc`

.

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 |

Value. To learn how value classes affect copy operations, see Copying Objects (MATLAB).

`ClassificationECOC`

| `ClassificationLinear`

| `fitcecoc`

| `fitclinear`

| `kfoldLoss`

| `kfoldPredict`