margin
Find classification margins for support vector machine (SVM) classifier
Description
returns the classification
margins (m
= margin(SVMModel
,Tbl
,ResponseVarName
)m
) for the trained support vector
machine (SVM) classifier SVMModel
using the sample data in
table Tbl
and the class labels in
Tbl.ResponseVarName
.
m
is returned as a numeric vector with the same length as
Y
. The software estimates each entry of
m
using the trained SVM classifier
SVMModel
, the corresponding row of
X
, and the true class label
Y
.
Examples
Input Arguments
More About
Algorithms
For binary classification, the software defines the margin for observation j, mj, as
where yj ∊ {-1,1}, and f(xj) is the predicted score of observation j for the positive class. However, mj = yjf(xj) is commonly used to define the margin.
References
[1] Christianini, N., and J. C. Shawe-Taylor. An Introduction to Support Vector Machines and Other Kernel-Based Learning Methods. Cambridge, UK: Cambridge University Press, 2000.
Extended Capabilities
Version History
Introduced in R2014a
See Also
ClassificationSVM
| CompactClassificationSVM
| loss
| predict
| edge
| fitcsvm