affinityMatrix {CancerSubtypes} | R Documentation |
This is the affinity Matrix function extracted from SNFtool package. Computes affinity matrix from a generic distance matrix
affinityMatrix(Diff, K = 20, sigma = 0.5)
Diff |
Distance matrix |
K |
Number of nearest neighbors |
sigma |
Variance for local model |
Returns an affinity matrix that represents the neighborhood graph of the data points.
data(miRNAExp) Dist1=dist2(t(miRNAExp),t(miRNAExp)) W1 = affinityMatrix(Dist1, 20, 0.5)