Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

makeKNNgraph

makeKNNgraph


Description

Create a K-nearest neighbor graph from data x. Uses nn2 as a fast way to find the neares neighbors.

Usage

makeKNNgraph(x, k, eps = 0, diag = FALSE)

Arguments

x

data, a matrix, observations in rows, dimensions in columns

k

the number of nearest neighbors.

eps

number, if eps > 0 the KNN search is approximate, see nn2

diag

logical, if TRUE every edge of the returned graph will have an edge with weight 0 to itself.

Value

an object of type igraph with edge weight being the distances.


dimRed

A Framework for Dimensionality Reduction

v0.2.3
GPL-3 | file LICENSE
Authors
Guido Kraemer [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.