View source: R/transformation.R
make.affinity | R Documentation |
Code from https://www.di.fc.ul.pt/~jpn/r/spectralclustering/spectralclustering.html Done applying a k-nearest neighboor filter to build a representation of a graph. connecting just the closest dataset points. However, to be symmetric, if Aij is selected as a nearest neighboor, so will Aji.
make.affinity(S, n.neighboors = 2)
S |
<matrix> Matrix to evaluate |
n.neighboors |
<int> Number of neighboors |
Affinity matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.