Main Content

Cross-validated kernel error-correcting output codes (ECOC) model for multiclass classification

`ClassificationPartitionedKernelECOC`

is an error-correcting output
codes (ECOC) model composed of kernel classification models, trained on cross-validated folds.
Estimate the quality of the classification by cross-validation using one or more
“kfold” functions: `kfoldPredict`

,
`kfoldLoss`

,
`kfoldMargin`

, and
`kfoldEdge`

.

Every “kfold” method 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. In this case, the software randomly
assigns each observation into five groups of equal size (roughly). The *training
fold* contains four of the groups (that is, roughly 4/5 of the data) and the
*validation 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}`

) 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}`

) 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 fashion 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 the
*i*th model. In short, the software estimates a response for every
observation by using the model trained without that observation.

**Note**

`ClassificationPartitionedKernelECOC`

model objects do not store the
predictor data set.

You can create a `ClassificationPartitionedKernelECOC`

model by training an
ECOC model using `fitcecoc`

and specifying these name-value pair arguments:

`'Learners'`

– Set the value to`'kernel'`

, a template object returned by`templateKernel`

, or a cell array of such template objects.One of the arguments

`'CrossVal'`

,`'CVPartition'`

,`'Holdout'`

,`'KFold'`

, or`'Leaveout'`

.

For more details, see `fitcecoc`

.

`kfoldEdge` | Classification edge for cross-validated kernel ECOC model |

`kfoldLoss` | Classification loss for cross-validated kernel ECOC model |

`kfoldMargin` | Classification margins for cross-validated kernel ECOC model |

`kfoldPredict` | Classify observations in cross-validated kernel ECOC model |

`fitcecoc`

| `fitckernel`

| `CompactClassificationECOC`

| `ClassificationKernel`