k.nearest.neighbors {FastKNN} | R Documentation |
k.nearest.neigbors
gives the list of points (k-Neigbours) that are closest
to the row i in descending order.k-Nearest Neighbors
the k.nearest.neigbors
gives the list of points (k-Neigbours) that are closest
to the row i in descending order.
k.nearest.neighbors(i, distance_matrix, k = 5)
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. |
The output of this function is used in the knn_test_function
function.
a k vector with the k closest neigbours to the i observation.
order