HCLUSTwrapper: Wrapper to do hierarchical clustering

Description Usage Arguments Value Author(s) See Also Examples

View source: R/HCLUSTwrapper.R

Description

Hierarchical clustering using Euclidean distances and (by default) the Ward criterion. The wrapper can perform an optimisation over clustering methods in case true labels are provided (i.e. optimising cluster assignments w.r.t. the Rand index).

Usage

1
2
HCLUSTwrapper(xx, k, method = "ward.D", true_labels = NULL,
  verbose = FALSE)

Arguments

xx

The data matrix (n x p).

k

The number of clusters.

method

Clustering method (see hclust). If method = "all" and true_labels is provided: optimise clustering w.r.t. Rand index and return method with highest adjusted RI. Default: method = "Ward.D".

true_labels

Vector of true cluster assignments (when provided, it is used to compute the Rand index).

verbose

Logical, when true: print progress information.

Value

model_fit

Model fit (output of hclust).

aRI

Adjusted Rand index (when true_labels is provided).

Author(s)

Bernd Taschler: bernd.taschler@dzne.de

See Also

hclust, adjustedRandIndex

Examples

1
  HCLUSTwrapper(xx = matrix(rnorm(500),50,10), k = 2)

btaschler/mcap documentation built on May 26, 2019, 1:31 a.m.