Learn R Programming

fdm2id (version 1.0.1)

HCA: Hierarchical Cluster Analysis method

Description

Run the HCA method for clustering.

Usage

HCA(
  d,
  k = NULL,
  method = c("ward", "single"),
  engine = c("hclust", "agnes"),
  graph = FALSE,
  ...
)

Value

The cluster hierarchy (hca object).

Arguments

d

The dataset (matrix or data.frame).

k

The number of cluster. If NULL (the default), it is set to the largest drop in aggregation height.

method

Character string defining the clustering method.

engine

Which implementation builds the hierarchy: hclust (the default) or agnes. They give the same hierarchy -- same heights, to machine precision, and the same cut -- but hclust is far faster on a large dataset (0.3 s against 30 s on 3000 observations). Use "agnes" for the linkages it alone provides, or to compare the two.

graph

A logical indicating whether or not a graphic should be plotted (the aggregation heights used to choose k, when k is not given).

...

Other parameters.

See Also

hclust, agnes, treeplot, predict.hca

Examples

Run this code
require (datasets)
data (iris)
HCA (iris [, -5], k = 3, method = "ward")

Run the code above in your browser using DataLab