knn: Classify points using k-nearest neighbors.

Description Usage Arguments

Description

This version is non-idiomatic to suit the compiler's quirks, and should not be called directly in the R interpreter.

Usage

1
.knn(distances, labels, n_class, k, n_train, n_test)

Arguments

distances

numeric, distance matrix, where rows correspond to training points and columns correspond to test points

labels

integer, class labels starting at 1

n_class

integer, number of classes

k

integer, number of nearest neighbors to use

n_train

integer, number of training points

n_test

integer, number of test points


nick-ulle/RCompilerExamples documentation built on May 23, 2019, 4:44 p.m.