Main Content

Edge of *k*-nearest neighbor classifier

returns the classification edge for `E`

= edge(`mdl`

,`tbl`

,`ResponseVarName`

)`mdl`

with data
`tbl`

and classification
`tbl.ResponseVarName`

. If `tbl`

contains the
response variable used to train `mdl`

, then you do not need to
specify `ResponseVarName`

.

The classification edge (`E`

) is a scalar value that represents
the mean of the classification margins.

computes the edge with additional observation weights `E`

= edge(___,'Weights',`weights`

)`weights`

,
using any of the input arguments in the previous syntaxes.