Class: ClassificationKNN
Predict resubstitution response of knearest neighbor classifier
label = resubPredict(mdl)
[label,score]
= resubPredict(mdl)
[label,score,cost]
= resubPredict(mdl)
returns
the labels label
= resubPredict(mdl
)mdl
predicts for the data mdl.X
. label
is
the predictions of mdl
on the data that fitcknn
used to create mdl
.
[
returns the posterior
class probabilities for the predictions.label
,score
]
= resubPredict(mdl
)
[
returns the misclassification
costs.label
,score
,cost
]
= resubPredict(mdl
)

Predicted class labels for the points in the training data 

Numeric matrix of size 

Matrix of expected costs of size 
If you specified to standardize the predictor data, that is, mdl.Mu
and mdl.Sigma
are
not empty ([]
), then resubPredict
standardizes
the predictor data before predicting labels.
ClassificationKNN
 fitcknn
 predict
 resubEdge
 resubLoss
 resubMargin