Whclust: Weighted hierarchical clustering (weighted Ward)

View source: R/nugget-clustering.R

WhclustR Documentation

Weighted hierarchical clustering (weighted Ward)

Description

Agglomerative clustering of weighted observations using the weighted Ward merge cost. Intended for the small set of data-nugget centres.

Usage

Whclust(x, weights = rep(1, nrow(x)))

Arguments

x

Numeric matrix, observations (e.g. nugget centres) in rows.

weights

Non-negative weight per observation.

Value

An hclust object.

References

Dey et al. (2025). WCluster.

See Also

Wkmeans, nugget_cluster

Examples

set.seed(1)
x <- rbind(matrix(rnorm(8 * 3, 0), 8), matrix(rnorm(8 * 3, 5), 8))
stats::cutree(Whclust(x, weights = rep(2, 16)), k = 2)[1:4]

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