Find classification margins for support vector machine (SVM) classifier by resubstitution

returns the resubstitution classification margins (`m`

= resubMargin(`SVMModel`

)`m`

) for the support vector
machine (SVM) classifier `SVMModel`

using the training data stored
in `SVMModel.X`

and the corresponding class labels stored in
`SVMModel.Y`

.

`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`

.

For binary classification, the software defines the margin for
observation *j*, *m _{j}*, as

$${m}_{j}=2{y}_{j}f({x}_{j}),$$

where *y _{j}* ∊ {-1,1}, and

[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.

`ClassificationSVM`

| `CompactClassificationSVM`

| `fitcsvm`

| `margin`

| `resubEdge`

| `resubLoss`