spectralAlg {CancerSubtypes} | R Documentation |
This is Spectral Clustering Algorithm extracted from SNFtools package spectralClustering() with a tiny modification.
spectralAlg(affinity, K, type = 3)
affinity |
Similarity matrix |
K |
Number of clusters |
type |
The variants of spectral clustering to use. |
A vector consisting of cluster labels of each sample.
####see the spectralClustering() in SNFtool package for the detail example. data(miRNAExp) #Dist1=dist2(t(miRNAExp),t(miRNAExp)) #W1 = affinityMatrix(Dist1, 20, 0.5) #group=spectralAlg(W1,3, type = 3)