spectralAlg {CancerSubtypes}R Documentation

This is an internal function but need to be exported for the function ExecuteSNF.CC() call.

Description

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

Usage

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

####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)


[Package CancerSubtypes version 1.8.0 Index]