powered by
Clusters \(n\) points of dimension \(m\) using a complete linkage algorithm and estimates \(K\).
gforce.hclust(X = NULL, dists = NULL, R_only = FALSE)
\(n x m\) matrix. Each row is treated as a point in \(R^m\).
\(n x n\) symmetric matrix. This encodes the distances between the \(n\) points.
logical expression. If R_only == FALSE, then the included native code implementation will be used. Otherwise, an R implementation is used.
R_only == FALSE
Returns an object with the components:
K
an estimate of the number of clusters.
clusters
a \(n\) dimensional integer vector. Entry \(i\) to the cluster assignment of the data point given by row \(i\) of X.
X
MSE
a \(n\) dimensional vector of the mean squared errors of each choice of \(K\).
D. Defays. An efficient algorithm for a complete link method. The Computer Journal, 1977.
# NOT RUN { m <- 10 n <- 10 X <- matrix(MASS::mvrnorm(m*n,rep(0,m*n),diag(m*n)), nrow = n) hc_res <- gforce.hclust(X=X) # }
Run the code above in your browser using DataLab