k.nearest.neighbors: k-Nearest Neighbors the 'k.nearest.neigbors' gives the list...

Description Usage Arguments Details Value See Also

View source: R/FastKNN.R

Description

k-Nearest Neighbors the k.nearest.neigbors gives the list of points (k-Neigbours) that are closest to the row i in descending order.

Usage

1
k.nearest.neighbors(i, distance_matrix, k = 5)

Arguments

i

is from the numeric class and is a row from the distance_matrix.

distance_matrix

is a nxn matrix.

k

is from the numeric class and represent the number of neigbours that the function will return.

Details

The output of this function is used in the knn_test_function function.

Value

a k vector with the k closest neigbours to the i observation.

See Also

order


FastKNN documentation built on May 1, 2019, 8:16 p.m.