Dune.Rd
Compute the ARI between every pair of clustering labels after merging every possible pair of clusters. Find the one that improves the ARI merging the most, merge the pair. Repeat until there is no improvement.
Dune(clusMat, ...) # S4 method for matrix Dune( clusMat, unclustered = NULL, verbose = FALSE, parallel = FALSE, BPPARAM = BiocParallel::bpparam() ) # S4 method for data.frame Dune( clusMat, unclustered = NULL, verbose = FALSE, parallel = FALSE, BPPARAM = BiocParallel::bpparam() ) # S4 method for SummarizedExperiment Dune( clusMat, cluster_columns, unclustered = NULL, verbose = FALSE, parallel = FALSE, BPPARAM = BiocParallel::bpparam() )
clusMat | the matrix of samples by clustering labels. |
---|---|
... | parameters including: |
unclustered | The value assigned to unclustered cells. Default to |
verbose | Whether or not the print cluster merging as it happens. |
parallel | Logical, defaults to FALSE. Set to TRUE if you want to parallellize the fitting. |
BPPARAM | object of class |
cluster_columns | if |
A list with four components: the initial matrix of clustering labels, the final matrix of clustering labels, the merge info matrix and the ARI improvement vector.
The Dune algorithm merges pairs of clusters in order to improve the mean adjusted Rand Index with other clustering labels. It returns a list with four components.: #'
initialMat
: The initial matrix of cluster labels
currentMat
: The final matrix of cluster labels
merges
: The step-by-step detail of the merges, recapitulating
which clusters where merged in which cluster label
impARI
: How much each merge improved the mean ARI between the
cluster label that has been merged and the other cluster labels.
clusterConversion ARIImp
data("clusMat", package = "Dune") merger <- Dune(clusMat = clusMat) # clusters 11 to 14 from cluster label 5 and 3 are subset of cluster 2 from # other cluster labels. Designing cluster 2 as unclustered therefore means we # do fewer merges. merger2 <- Dune(clusMat = clusMat, unclustered = 2) merger$merges#> clusteringLabel cluster1 cluster2 #> 1 B 11 12 #> 2 C 11 12 #> 3 D 11 13 #> 4 E 11 13 #> 5 E 11 14 #> 6 D 11 12 #> 7 E 11 12merger2$merges#> clusteringLabel cluster1 cluster2 #> 1 B 11 12 #> 2 C 11 12 #> 3 D 11 13 #> 4 E 11 13 #> 5 E 11 14 #> 6 D 11 12 #> 7 E 11 12