spectralAlg: This is an internal function but need to be exported for the...

Description Usage Arguments Value Examples

Description

This is Spectral Clustering Algorithm extracted from SNFtools package spectralClustering() with a tiny modification.

Usage

1
spectralAlg(affinity, K, type = 3)

Arguments

affinity

Similarity matrix

K

Number of clusters

type

The variants of spectral clustering to use.

Value

A vector consisting of cluster labels of each sample.

Examples

1
2
3
4
5
####see the spectralClustering() in SNFtool package for the detail example.
data(miRNAExp)
Dist1=SNFtool::dist2(t(miRNAExp),t(miRNAExp))
W1 = SNFtool::affinityMatrix(Dist1, 20, 0.5)
group=spectralAlg(W1,3, type = 3)

CancerSubtypes documentation built on Nov. 8, 2020, 8:24 p.m.