# resubMargin

Resubstitution classification margin

## Description

returns the resubstitution Classification Margin (`m`

= resubMargin(`Mdl`

)`m`

) for
the trained classification model `Mdl`

using the predictor data stored in
`Mdl.X`

and the corresponding true class labels stored in
`Mdl.Y`

.

`m`

is returned as an *n*-by-1 numeric column
vector, where *n* is the number of observations in the predictor
data.

specifies whether to include interaction terms in computations. This syntax applies only to
generalized additive models.`m`

= resubMargin(`Mdl`

,'IncludeInteractions',`includeInteractions`

)

## Examples

## Input Arguments

## More About

## Algorithms

`resubMargin`

computes the classification margin according to the
corresponding `margin`

function of the object (`Mdl`

).
For a model-specific description, see the `margin`

function reference pages
in the following table.

Model | Classification Model Object (`Mdl` ) | `margin` Object Function |
---|---|---|

Generalized additive model | `ClassificationGAM` | `margin` |

k-nearest neighbor model | `ClassificationKNN` | `margin` |

Naive Bayes model | `ClassificationNaiveBayes` | `margin` |

Neural network model | `ClassificationNeuralNetwork` | `margin` |

Support vector machine for one-class and binary classification | `ClassificationSVM` | `margin` |

## Extended Capabilities

## Version History

**Introduced in R2012a**