Purpose
Predicts target classes, using a knnModel
structure created by knnFit
.
Format
y_hat = knnClassify(mdl, X);
Inputs
- mdl
knnModel
structure returned from a call toknnFit
.- X
- NxP matrix, the training data.
Output
- y_hat
- Nx1 numeric or string vector, containing the predicted classes.
See also
knnFit