selectK {MAIT} | R Documentation |
Function selectK
finds the optimum number of nearest neighbours for the K-Nearest Neighbours (KNN) algorithm.
selectK(data, class, max.k)
data |
A numerical matrix containing the data |
class |
Vector containing the class label of each sample. |
max.k |
Maximum number of nearest neighbours to be considered. |
A numeric value of the optimal number of neighbours to be considered in a KNN run.
Francesc Fernandez, francesc.fernandez.albert@upc.edu