View source: R/AffinityNetworkFusion.R
kNN_graph | R Documentation |
Calculate k-nearest-neighbor graph from affinity matrix and normalize it as transition matrix
kNN_graph(W, K)
W |
affinity matrix (its elements are non-negative real numbers) |
K |
the number of k nearest neighbors |
a transition matrix of the same shape as W
D = matrix(runif(400),20)
W = affinity_matrix(D, 5)
S = kNN_graph(W, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.