powered by
This function builds a classification model using Logistic Regression.
KNN(train, labels, k = 1:10, tune = FALSE, ...)
The classification model.
The training set (description), as a data.frame.
data.frame
Class labels of the training set (vector or factor).
vector
factor
The k parameter.
If true, the function returns paramters instead of a classification model.
Other parameters.
knn
require (datasets) data (iris) KNN (iris [, -5], iris [, 5])
Run the code above in your browser using DataLab