selectK: Looks for the optimum number of nearest neighbours to be...

Description Usage Arguments Value Author(s) See Also

View source: R/selectK.R

Description

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

Usage

1
2
3
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


MAIT documentation built on Nov. 8, 2020, 5:43 p.m.