compare_methods_plot: Visually compare clustering solutions with ComparePlot (no...

View source: R/manuscript-viz.R

compare_methods_plotR Documentation

Visually compare clustering solutions with ComparePlot (no ground truth)

Description

Aligns several clustering solutions of the same objects and draws them with ComparePlot so their agreement can be read off directly – which objects the methods place together and where they disagree – without any ground truth. Each solution may be a fitted result (with $Clust / $DistM) or a plain label vector; label vectors are turned into a co-membership dissimilarity so every solution is comparable.

Usage

compare_methods_plot(
  solutions,
  nrclusters,
  cols = NULL,
  cex.labels = 0.5,
  margins = c(5, 11, 3, 2),
  ...
)

Arguments

solutions

A named list of fitted results and/or label vectors, all over the same objects in the same order.

nrclusters

Number of clusters to cut each solution into.

cols

Optional cluster colours; defaults to a distinct palette.

cex.labels, margins

Passed to ComparePlot.

...

Further arguments to ComparePlot.

Value

Invisibly NULL; called for the plot. Needs circlize and plotrix.

See Also

clustering_concordance, ComparePlot

Examples

data(mosaic_toy)
sols <- list(
  var    = M_ABC(mosaic_toy$List, numsim = 40, NC = 3, weighting = c("var", "var")),
  nugget = M_ABC(mosaic_toy$List, numsim = 40, NC = 3, weighting = c("nugget", "nugget")),
  NEMO   = NEMO(mosaic_toy$List, k = 3)$cluster)
## Not run: compare_methods_plot(sols, nrclusters = 3)

MosaiClusteR documentation built on Oct. 25, 2026, 1:08 a.m.