discardSupportVectors
Discard support vectors of linear SVM binary learners in ECOC model
Description
returns a trained multiclass error-correcting output codes (ECOC) model
(Mdl = discardSupportVectors(MdlSV)Mdl) from the trained multiclass ECOC model
(MdlSV), which contains at least one linear
CompactClassificationSVM binary learner. Both
Mdl and MdlSV are objects of the same
type, either ClassificationECOC objects or CompactClassificationECOC objects.
Mdl has these characteristics:
The
Alpha,SupportVectors, andSupportVectorLabelsproperties of all the linear SVM binary learners are empty ([]).If you display any linear SVM binary learners stored in the cell array of trained models
Mdl.BinaryLearners, the software lists theBetaproperty instead ofAlpha.
Examples
Input Arguments
More About
Tips
By default and for efficiency,
fitcecocempties theAlpha,SupportVectorLabels, andSupportVectorsproperties for all linear SVM binary learners.fitcecoclistsBeta, rather thanAlpha, in the model display.To store
Alpha,SupportVectorLabels, andSupportVectors, pass a linear SVM template that specifies storing support vectors tofitcecoc. For example, enter:t = templateSVM('SaveSupportVectors',true) Mdl = fitcecoc(X,Y,'Learners',t);
You can remove the support vectors and related values by passing the resulting
ClassificationECOCmodel todiscardSupportVectors.
Algorithms
predict and resubPredict estimate SVM scores
f(x) for each linear SVM binary learner in an
ECOC model using
β is the Beta property and
b is the Bias property of the binary
learners. You can access these properties for each linear SVM binary learner in the cell
array Mdl.BinaryLearners. For more details on the SVM score
calculation, see Support Vector Machines for Binary Classification.
Extended Capabilities
Version History
Introduced in R2015a