compareARI: Pairwise comparisons of ARI values among a set of clustering...

Description Usage Arguments Value Author(s) Examples

Description

Provides the adjusted rand index (ARI) between pairs of clustering paritions.

Usage

1
2
compareARI(x, K = NULL, parallel = FALSE, BPPARAM = bpparam(),
  plot = TRUE, ...)

Arguments

x

Object of class coseq, NormMixClus, or PoisMixClusWrapper (object defined in the HTSCluster package that is indirectly called by coseq for Poisson mixture models), or alternatively a n x M data.frame or matrix containing the clustering partitions for M different models

K

If NULL, pairwise ARI values will be calculated among every model in object x. Otherwise, K provides a vector of cluster numbers identifying a subset of models in x.

parallel

If FALSE, no parallelization. If TRUE, parallel execution using BiocParallel (see next argument BPPARAM). Note that parallelization is unlikely to be helpful unless the number of observations n in the clustering partitions or the number of models M are very large.

BPPARAM

Optional parameter object passed internally to bplapply when parallel=TRUE. If not specified, the parameters last registered with register will be used.

plot

If TRUE, provide a heatmap using corrplot to visualize the calculated pairwise ARI values.

...

Additional optional parameters for corrplot

Value

Matrix of adjusted rand index values calculated between each pair of models.

Author(s)

Andrea Rau

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Simulate toy data, n = 300 observations
set.seed(12345)
countmat <- matrix(runif(300*4, min=0, max=500), nrow=300, ncol=4)
countmat <- countmat[which(rowSums(countmat) > 0),]
conds <- rep(c("A","B","C","D"), each=2)

## Run the Normal mixture model for K = 2,3,4
run_arcsin <- coseq(y=countmat, K=2:4, iter=5, transformation="arcsin")

## Plot and summarize results
plot(run_arcsin)
summary(run_arcsin)

## Compare ARI values for all models (no plot generated here)
ARI <- compareARI(run_arcsin, plot=FALSE)

## Compare ICL values for models with arcsin and logit transformations
run_logit <- coseq(y=countmat, K=2:4, iter=5, transformation="logit")
compareICL(list(run_arcsin, run_logit))

coseq documentation built on May 2, 2019, 4:55 p.m.