KNN {fdm2id} | R Documentation |
Classification using k-NN
Description
This function builds a classification model using Logistic Regression.
Usage
KNN(train, labels, k = 1:10, tune = FALSE, ...)
Arguments
train |
The training set (description), as a |
labels |
Class labels of the training set ( |
k |
The k parameter. |
tune |
If true, the function returns paramters instead of a classification model. |
... |
Other parameters. |
Value
The classification model.
See Also
Examples
require (datasets)
data (iris)
KNN (iris [, -5], iris [, 5])
[Package fdm2id version 0.9.9 Index]