Learn R Programming

SPARTAAS (version 1.2.7)

hclust: Hierarchical clustering for multiple datasets (Compromised clustering).

Description

Implementation of stats::hclust for dealing with multiple dissimilarities matrices. We use fastcluster::hclust, another implementation of hclust with faster algorithms.

Usage

hclust(d, method = "complete", members = NULL, weight = NULL)

Value

See stats::hclust or fastcluster::hclust

Arguments

d

a dissimilarity structure as produced by dist or a list of dissimilarity structure.

method

the agglomeration method to be used. This should be (an unambiguous abbreviation of) one of "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).

members

NULL or a vector with length size of d. See stats::hclust ‘Details’ section.

weight

The parameter in order to generate a mixed matrix on which the classical hclust method is applied (same length as d).
Formula: $$D_\alpha = w_1 D_1 + w_2 D_2 + ...$$
where \(w_1\) is the first value of vector weight, \(D_1\) the first matrix of d and \(D_\alpha\) the mixed matrix used in hclust. Sum of weight must be 1.

Author

The stats::hclust function is based on Fortran code contributed to STATLIB by F. Murtagh. The fastcluster::hclust function implements hierarchical clustering with the same interface as hclust from the stats package but with much faster algorithms.

A. COULON

L. BELLANGER

P. HUSI

Details

Data fusion (parameter weigth): it is necessary to define the appropriate proportion for each data source. This is the first sensitive point of the method that the user has to consider. A tool is provided to help him in his decision see hclustcompro_select_alpha (case with only 2 matrices) or optim_select_alpha.

Examples

Run this code
data(datangkor)

#network stratigraphic data (Network)
network <- datangkor$stratigraphy

#contingency table
cont <- datangkor$contingency

#obtain the dissimilarities matrices
distance <- CAdist(cont, nPC = 11)
constraint <- adjacency(network)

D1 = distance
D2 = constraint

tree = hclust(d = list(D1, D2), method = "ward.D2", weight = c(0.7,0.3))
plot(tree, hang=-1)

Run the code above in your browser using DataLab