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

returns the classification loss by
resubstitution (L), the in-sample classification loss, for the support vector
machine (SVM) classifier `L`

= resubLoss(`SVMModel`

)`SVMModel`

using the training data stored
in `SVMModel.X`

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

.

The classification loss (`L`

) is a generalization or
resubstitution quality measure. Its interpretation depends on the loss function and
weighting scheme, but, in general, better classifiers yield smaller classification
loss values.

[1] Hastie, T., R. Tibshirani, and J. Friedman. *The
Elements of Statistical Learning*, second edition. Springer, New York,
2008.