# kfoldMargin

Classification margins for cross-validated classification model

## Description

returns classification
margins obtained by the cross-validated classification model
`M`

= kfoldMargin(`CVMdl`

)`CVMdl`

. For every fold, `kfoldMargin`

computes
classification margins for validation-fold observations using a classifier trained on
training-fold observations. `CVMdl.X`

and `CVMdl.Y`

contain both sets of observations.

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

= kfoldMargin(`CVMdl`

,'IncludeInteractions',`includeInteractions`

)

## Examples

## Input Arguments

## Output Arguments

## More About

## Algorithms

`kfoldMargin`

computes classification margins as described in the
corresponding `margin`

object function. For a model-specific description,
see the appropriate `margin`

function reference page in the following
table.

Model Type | `margin` Function |
---|---|

Discriminant analysis classifier | `margin` |

Ensemble classifier | `margin` |

Generalized additive model classifier | `margin` |

k-nearest neighbor classifier | `margin` |

Naive Bayes classifier | `margin` |

Neural network classifier | `margin` |

Support vector machine classifier | `margin` |

Binary decision tree for multiclass classification | `margin` |

## Extended Capabilities

## See Also

`ClassificationPartitionedModel`

| `kfoldPredict`

| `kfoldEdge`

| `kfoldLoss`

| `kfoldfun`

**Introduced in R2011a**