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
, andSupportVectorLabels
properties 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 theBeta
property instead ofAlpha
.
Examples
Input Arguments
More About
Tips
By default and for efficiency,
fitcecoc
empties theAlpha
,SupportVectorLabels
, andSupportVectors
properties for all linear SVM binary learners.fitcecoc
listsBeta
, 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
ClassificationECOC
model 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