KNN | R Documentation |
This function builds a classification model using Logistic Regression.
KNN(train, labels, k = 1:10, tune = FALSE, ...)
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. |
The classification model.
knn
require (datasets)
data (iris)
KNN (iris [, -5], iris [, 5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.