% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nugget-clustering.R
\name{Whclust}
\alias{Whclust}
\title{Weighted hierarchical clustering (weighted Ward)}
\usage{
Whclust(x, weights = rep(1, nrow(x)))
}
\arguments{
\item{x}{Numeric matrix, observations (e.g. nugget centres) in rows.}

\item{weights}{Non-negative weight per observation.}
}
\value{
An \code{\link[stats]{hclust}} object.
}
\description{
Agglomerative clustering of weighted observations using the weighted Ward
merge cost. Intended for the small set of data-nugget centres.
}
\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]
}
\references{
Dey et al. (2025). WCluster.
}
\seealso{
\code{\link{Wkmeans}}, \code{\link{nugget_cluster}}
}
