Margin of k-nearest neighbor classifier by resubstitution
returns the classification margins
(m
= resubMargin(mdl
)m
) of the data used to train
mdl
.
m
is returned as a numeric vector of length
size(mdl.X,1)
, where mdl.X
is the training
data for mdl
. Each entry in m
represents
the margin for the corresponding row of mdl.X
and the
corresponding true class label in mdl.Y
.
ClassificationKNN
| fitcknn
| resubEdge
| resubLoss
| resubPredict