gforce.hclust: Hierarchical Clustering with Estimation of K.

Description Usage Arguments Value References Examples

View source: R/hclust.R

Description

Clusters n points of dimension m using a complete linkage algorithm and estimates K.

Usage

1
gforce.hclust(X = NULL, dists = NULL, R_only = FALSE)

Arguments

X

n x m matrix. Each row is treated as a point in R^m.

dists

n x n symmetric matrix. This encodes the distances between the n points.

R_only

logical expression. If R_only == FALSE, then the included native code implementation will be used. Otherwise, an R implementation is used.

Value

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.

MSE

a n dimensional vector of the mean squared errors of each choice of K.

References

D. Defays. An efficient algorithm for a complete link method. The Computer Journal, 1977.

Examples

1
2
3
4
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)

GFORCE documentation built on May 2, 2019, 3:44 a.m.