Learn R Programming

diem (version 1.0)

get_knn: Get k-nearest neighbor graph

Description

Run a KNN graph and store as an igraph object. The nearest neighbors are calculated using the dbscan implementation. The edges of the graph can be weighted with the inverse of the euclidean distance.

Usage

get_knn(x, nn = 30, weighted = TRUE, verbose = FALSE)

Arguments

x

An SCE object.

nn

Number of nearest neighbors to use.

weighted

Logical indicating whether to weigh the knn graph.

verbose

verbosity

Value

An SCE object