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

Trains the model

status = model.train(samples, responses)
status = model.train(csvFilename, [])
[...] = model.train(..., 'OptionName', optionValue, ...)

Input

Output

Options

Options for Data (first variant with samples and reponses)

Options for Data (second variant for loading CSV file)

The method trains the K-Nearest model. It follows the conventions of the generic train approach with the following limitations:

See also
Method Details
Access public
Sealed false
Static false