knn_dist: K nearest neighbors in a dissimilarity matrix
Description
knn_dist searches for nearest neighbors in a dissimilarity matrix matrix.
Usage
knn_dist(D, K)
Value
A list with two components:
nn.dist
An (n,K) matrix for the nearest neighbor dissimilarities.
nn.index
An (n,K) matrix for the nearest neighbor indices.
Arguments
D
Dissimilarity matrix of size (n,n), where n is the number of objects.
K
Number of neighbors
Author
Thierry Denoeux.
Details
This function is called by EkNNclus if argument x is not supplied.
It is not optimized and cannot be used for very large D. If an attribute matrix
x is supplied and D is the matrix of Euclidean distances, it is preferable to use
function get.knn from package FNN.