selectK {MAIT}R Documentation

Looks for the optimum number of nearest neighbours to be considered for the KNN

Description

Function selectK finds the optimum number of nearest neighbours for the K-Nearest Neighbours (KNN) algorithm.

Usage


selectK(data,
         class,
         max.k)

Arguments

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.

Value

A numeric value of the optimal number of neighbours to be considered in a KNN run.

Author(s)

Francesc Fernandez, francesc.fernandez.albert@upc.edu

See Also

Validation


[Package MAIT version 1.27.0 Index]