KNN: Classification using k-NN

KNNR 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 data.frame.

labels

Class labels of the training set (vector or factor).

k

The k parameter.

tune

If true, the function returns paramters instead of a classification model.

...

Other parameters.

Value

The classification model.

See Also

knn

Examples

require (datasets)
data (iris)
KNN (iris [, -5], iris [, 5])

fdm2id documentation built on July 9, 2023, 6:05 p.m.

Related to KNN in fdm2id...