ClusterSickleJr: Cluster the \mathbf{H} matrix

View source: R/jrSiCKLSNMF.R

ClusterSickleJrR Documentation

Cluster the \mathbf{H} matrix

Description

Perform k-means, spectral clustering, clustering based off of the index of the maximum latent factor, or Louvain community detection on the \mathbf{H} matrix. Defaults to k-means.

Usage

ClusterSickleJr(
  SickleJr,
  numclusts,
  method = "kmeans",
  neighbors = 20,
  louvainres = 0.3
)

Arguments

SickleJr

An object of class SickleJr

numclusts

Number of clusters; can be NULL when method is "max" or "louvain"

method

String holding the clustering method: can choose "kmeans" for k-means clustering, "spectral" for spectral clustering, "louvain" for Louvain community detection or "max" for clustering based on the maximum row value; note that "max" is only appropriate for jrSiCKLSNMF with L2 norm row regularization

neighbors

Number indicating the number of neighbors to use to generate the graphs for spectral clustering and Louvain community detection: both of these methods require the construction of a graph first (here we use KNN); defaults to 20 and unused when the clustering method equal to "kmeans" or "max"

louvainres

Numeric containing the resolution parameter for Louvain community detection; unused for all other methods

Value

SickleJr- an object of class SickleJr with added clustering information

References

\insertRef

louvainjrSiCKLSNMF

\insertRef

Lun2016jrSiCKLSNMF

\insertRef

Ng2001jrSiCKLSNMF

\insertRef

Schliep2016jrSiCKLSNMF

\insertRef

maxclusterjrSiCKLSNMF

Examples

SimSickleJrSmall<-ClusterSickleJr(SimSickleJrSmall,3)
SimSickleJrSmall<-ClusterSickleJr(SimSickleJrSmall,method="louvain",neighbors=5)
SimSickleJrSmall<-ClusterSickleJr(SimSickleJrSmall,method="spectral",neighbors=5,numclusts=3)
#DO NOT DO THIS FOR REAL DATA; this is just to illustrate max clustering
SimSickleJrSmall<-SetLambdasandRowReg(SimSickleJrSmall,rowReg="L2Norm")
SimSickleJrSmall<-ClusterSickleJr(SimSickleJrSmall,method="max")

jrSiCKLSNMF documentation built on Aug. 12, 2025, 1:08 a.m.