estkTW | R Documentation |
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.
estkTW(x)
x |
A numeric matrix or data frame where rows are observations and columns are variables. |
The estimated number of clusters (k).
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.