View source: R/build_knn_graph.R
knn_graph_from_dist | R Documentation |
"build_knn_graph"
)Build kNN graph from distance
(used in "build_knn_graph"
)
knn_graph_from_dist(D, k = 5, return_neighbors_order = TRUE, mode = "all")
D |
dist matrix or dist object (preferentially) |
k |
kNN parameter |
return_neighbors_order |
whether return order of neighbors (not available for nn2 option) |
mode |
mode of graph_from_adj_list ('all' – undirected graph, 'out' – directed graph) |
a list with components
graph.knn - igraph object
order - Nxk matrix with indices of k nearest neighbors ordered by relevance (from 1st to k-th)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.