Cluster: Single-source base clustering

View source: R/cluster.R

ClusterR Documentation

Single-source base clustering

Description

Cluster one data (or distance) matrix with agglomerative hierarchical clustering. This is the Layer-2 baseline primitive of the MoSaIC framework: run it on each tile on its own to see what each modality recovers before integrating. It also underpins HierarchicalEnsembleClustering.

Usage

Cluster(
  Data,
  type = c("data", "dist"),
  distmeasure = "euclidean",
  normalize = FALSE,
  method = NULL,
  clust = "agnes",
  linkage = "ward",
  alpha = 0.625,
  StopRange = TRUE,
  ...
)

Arguments

Data

A data matrix (objects in rows) or a precomputed distance matrix.

type

"data" to compute a distance first, or "dist" if Data is already a dissimilarity matrix.

distmeasure

Distance measure (see Distance), used when type = "data".

normalize, method

Normalisation controls passed to Distance.

clust

Clustering backend; currently "agnes".

linkage

Agglomeration method. Default "ward".

alpha

Flexible-linkage parameter for cluster::agnes.

StopRange

Logical; if FALSE and the dissimilarities fall outside [0, 1] they are range-normalised for comparability.

...

Ignored; accepted for backward compatibility (e.g. gap, maxK).

Value

A list with DistM (the dissimilarity matrix) and Clust (an agnes object).

See Also

Distance, M_ABC

Examples

data(mosaic_toy)
base1 <- Cluster(t(mosaic_toy$List[[1]]), type = "data",
                 distmeasure = "euclidean")
mosaic_labels(base1, k = 3)[1:6]

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