Main Content

Find classification error for support vector machine (SVM) classifier

returns the classification error (see Classification Loss), a
scalar representing how well the trained support vector machine (SVM) classifier
(`L`

= loss(`SVMModel`

,`TBL`

,`ResponseVarName`

)`SVMModel`

) classifies the predictor data in table
`TBL`

compared to the true class labels in
`TBL.ResponseVarName`

.

`loss`

normalizes the class probabilities in
`TBL.ResponseVarName`

to the prior class probabilities that
`fitcsvm`

used for training, stored
in the `Prior`

property of `SVMModel`

.

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.

specifies options using one or more name-value pair arguments in addition to the
input arguments in previous syntaxes. For example, you can specify the loss
function and the classification weights.`L`

= loss(___,`Name,Value`

)

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

`ClassificationSVM`

| `CompactClassificationSVM`

| `fitcsvm`

| `predict`