Learn R Programming

RSSL (version 0.9.7)

adjacency_knn: Calculate knn adjacency matrix

Description

Calculates symmetric adjacency: objects are neighbours is either one of them is in the set of nearest neighbours of the other.

Usage

adjacency_knn(X, distance = "euclidean", k = 6)

Value

Symmetric binary adjacency matrix

Arguments

X

matrix; input matrix

distance

character; distance metric used in the dist function

k

integer; Number of neighbours