discardSupportVectors
Discard support vectors for linear support vector machine (SVM) classifier
Description
returns the trained, linear support vector machine (SVM) model
Mdl = discardSupportVectors(MdlSV)Mdl. Both Mdl and the trained, linear SVM
model MdlSV are the same type of object. That is, they both are
either ClassificationSVM objects or CompactClassificationSVM objects. However, Mdl and
MdlSV differ in the following ways:
The
Alpha,SupportVectors, andSupportVectorLabelsproperties are empty ([]) inMdl.If you display
Mdl, the software lists theBetaproperty instead ofAlpha.
Examples
Input Arguments
Tips
For a trained, linear SVM model, the
SupportVectorsproperty is an nsv-by-p matrix. nsv is the number of support vectors (at most the training sample size) and p is the number of predictors, or features. TheAlphaandSupportVectorLabelsproperties are vectors with nsv elements. These properties can be large for complex data sets containing many observations or examples. TheBetaproperty is a vector with p elements.If the trained SVM model has many support vectors, use
discardSupportVectorsto reduce the amount of space consumed by the trained, linear SVM model. You can display the size of the support vector matrix by enteringsize(MdlSV.SupportVectors).
Algorithms
predict and resubPredict estimate SVM scores
f(x), and subsequently label and estimate
posterior probabilities using
β is Mdl.Beta and
b is Mdl.Bias, that is, the
Beta and Bias properties of
Mdl, respectively. For more details, see Support Vector Machines for Binary Classification.
Extended Capabilities
Version History
Introduced in R2015a