MATLAB File Help: cv.KNearest/KNearest Index
cv.KNearest/KNearest

Creates/trains a K-Nearest Neighbors model

model = cv.KNearest()
model = cv.KNearest(...)

The first variant creates an empty model. Use cv.KNearest.train to train the model.

The second variant accepts the same parameters as the train method, in which case it forwards the call after construction.

See also