estkTW: Estimate the Number of Clusters (k) Using the Tracy-Widom...

View source: R/methods.R

estkTWR Documentation

Estimate the Number of Clusters (k) Using the Tracy-Widom Bound

Description

This function estimates the number of clusters (k) in a dataset using the Tracy-Widom distribution as a bound for the eigenvalues of the scaled data covariance matrix.

Usage

estkTW(x)

Arguments

x

A numeric matrix or data frame where rows are observations and columns are variables.

Value

The estimated number of clusters (k).

Examples

library(scater)
library(splatter)

sce <- splatSimulate(group.prob = rep(1, 5)/5, sparsify = FALSE, 
        batchCells=100, nGenes=1000, method = "groups", verbose = FALSE, 
        dropout.type = "experiment")
sce <- logNormCounts(sce)
logX <- as.matrix(logcounts(sce))
k <- estkTW(logX)


khazum/ccImpute documentation built on July 26, 2024, 1:13 a.m.