selectModels
Choose subset of multiclass ECOC models composed of binary
ClassificationLinear learners
Description
returns a subset of trained error-correcting output codes (ECOC) models composed of
SubMdl = selectModels(Mdl,idx)ClassificationLinear binary models from a set of multiclass
ECOC models (Mdl) trained using various regularization
strengths. The indices (idx) correspond to the regularization
strengths in Mdl.BinaryLearners{1}.Lambda and specify which
models to return.
SubMdl is returned as a CompactClassificationECOC model object.
Examples
Input Arguments
Tips
One way to build several predictive ECOC models composed of binary linear classification models is:
Create a linear classification model template using
templateLinearand specify a grid of regularization strengths using the'Lambda'name-value pair argument.Hold out a portion of the data for testing.
Train an ECOC model using
fitcecoc. Specify the template using the'Learners'name-value pair argument and supply the training data.fitcecocreturns oneCompactClassificationECOCmodel object containingClassificationLinearbinary learners, but all binary learners contain a model for each regularization strength.To determine the quality of each regularized model, pass the returned model object and the held-out data to, for example,
loss.Identify the indices (
idx) of a satisfactory subset of regularized models, and then pass the returned model and the indices toselectModels. The functionselectModelsreturns oneCompactClassificationECOCmodel object, but it containsnumel(idx)regularized models.To predict class labels for new data, pass the data and the subset of regularized models to
predict.
Extended Capabilities
Version History
Introduced in R2016aSee Also
ClassificationLinear | CompactClassificationECOC | predict | loss | fitcecoc | templateLinear
