nearest_knn
nearest_knn.Rd
Extract Top k Nearest Neighbor Pairs by Distance
Arguments
- dis
A symmetric distance matrix (as `dist` or matrix).
- k
Integer. Number of nearest neighbors to compute per item.
- top
Integer. Number of top-ranked unique nearest neighbor pairs to return (default: 3).
Value
A data frame with columns `i`, `j`, and `dis`, listing the top nearest neighbor pairs and their distances.