jackstraw_MiniBatchKmeans {jackstraw}R Documentation

Non-Parametric Jackstraw for Mini Batch K-means Clustering

Description

Test the cluster membership for K-means clustering

Usage

jackstraw_MiniBatchKmeans(
  dat,
  MiniBatchKmeans.output = NULL,
  s = NULL,
  B = NULL,
  center = TRUE,
  covariate = NULL,
  verbose = FALSE,
  batch_size = floor(nrow(dat)/100),
  initializer = "kmeans++",
  pool = TRUE,
  ...
)

Arguments

dat

a data matrix with m rows as variables and n columns as observations.

MiniBatchKmeans.output

an output from applying ClusterR::MiniBatchKmeans() onto dat. This provides more controls over the algorithm and subsequently the initial centroids used.

s

a number of “synthetic” null variables. Out of m variables, s variables are independently permuted.

B

a number of resampling iterations.

center

a logical specifying to center the rows. By default, TRUE.

covariate

a model matrix of covariates with n observations. Must include an intercept in the first column.

verbose

a logical specifying to print the computational progress. By default, FALSE.

batch_size

the size of the mini batches.

initializer

the method of initialization. By default, kmeans++.

pool

a logical specifying to pool the null statistics across all clusters. By default, TRUE.

...

optional arguments to control the Mini Batch K-means clustering algorithm (refers to ClusterR::MiniBatchKmeans).

Details

K-means clustering assign m rows into K clusters. This function enable statistical evaluation if the cluster membership is correctly assigned. Each of m p-values refers to the statistical test of that row with regard to its assigned cluster. Its resampling strategy accounts for the over-fitting characteristics due to direct computation of clusters from the observed data and protects against an anti-conservative bias.

Value

jackstraw_MiniBatchKmeans returns a list consisting of

F.obs

m observed F statistics between variables and cluster centers.

F.null

F null statistics between null variables and cluster centers, from the jackstraw method.

p.F

m p-values of membership.

Author(s)

Neo Christopher Chung nchchung@gmail.com

References

Chung (2020) Statistical significance of cluster membership for unsupervised evaluation of cell identities. Bioinformatics, 36(10): 3107–3114 https://academic.oup.com/bioinformatics/article/36/10/3107/5788523

Examples

## Not run: 
library(ClusterR)
dat = t(scale(t(Jurkat293T), center=TRUE, scale=FALSE))
MiniBatchKmeans.output <- MiniBatchKmeans(data=dat, clusters = 2, batch_size = 300,
initializer = "kmeans++")
jackstraw.output <- jackstraw_MiniBatchKmeans(dat,
MiniBatchKmeans.output = MiniBatchKmeans.output)

## End(Not run)


[Package jackstraw version 1.3.9 Index]