makeKNNgraph | R Documentation |
Create a K-nearest neighbor graph from data x. Uses
nn2
as a fast way to find the neares neighbors.
makeKNNgraph(x, k, eps = 0, diag = FALSE)
x |
data, a matrix, observations in rows, dimensions in columns |
k |
the number of nearest neighbors. |
eps |
number, if |
diag |
logical, if |
an object of type igraph
with edge
weight being the distances.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.