View source: R/nugget-clustering.R
| Whclust | R Documentation |
Agglomerative clustering of weighted observations using the weighted Ward merge cost. Intended for the small set of data-nugget centres.
Whclust(x, weights = rep(1, nrow(x)))
x |
Numeric matrix, observations (e.g. nugget centres) in rows. |
weights |
Non-negative weight per observation. |
An hclust object.
Dey et al. (2025). WCluster.
Wkmeans, nugget_cluster
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]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.