Learn R Programming

labelrank (version 0.1)

kNN: Nearest neighbor

Description

An auxiliary function to find the nearest neighbors from the distance matrix

Usage

kNN(model, k)

Arguments

model
nearest neighbor ranking model
k
number of the nearest neighbors to consider

Value

a vector of length of model

Details

This function is applied to find the nearest neighbors in the distance matrix.