clustering: Agglomerative hierarchical clustering

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/clustering.R

Description

Computes agglomerative hierarchical clustering of the dataset.

Usage

1
  clustering(data, metric="euclidean", method="ward", nb)

Arguments

data

Expression matrix, genes on rows and samples on columns

metric

Character string specifying the metric to be used for calculating dissimilarities between the columns of the matrix. This must be one of 'euclidean', 'manhattan', 'pearson', 'pearsonabs', 'spearman', 'spearmanabs', 'jaccard', 'dice'

method

Character string defining the clustering method. This must be one of 'average', 'single', 'complete', 'ward'

nb

The number of classes for kmeans and PAM clustering (kcentroids)

Details

Available metrics are (written for two vectors x and y):

euclidean:

Usual square distance between the two vectors.

manhattan:

Absolute distance between the two vectors

pearson:

Pearson correlation distance. (1 - r)/2

pearsonabs:

Absolute Pearson correlation distance. 1 - abs(r)

spearman:

Spearman rank correlation distance. (1 - r)/2

spearmanabs:

Absolute Spearlan rnak correlation distance. 1 - abs(r)

jaccard:

Jaccard distance on 0-1 matrix

dice:

Dice distance on 0-1 matrix

Available agglomerative methods are :

average:

The distance between two clusters is the average of the dissimilarities between the points in one cluster and the points in the other cluster.

single:

we use the smallest dissimilarity between a point in the first cluster and a point in the second cluster (nearest neighbor method).

complete:

we use the largest dissimilarity between a point in the first cluster and a point in the second cluster

ward:

Ward's agglomerative method

weighted:

The weighted distance from the agnes package

diana:

computes a divise clustering

kcentroids:

Perform either kmeans clustering if the distance is euclidean or PAM clustering. The number of classes nb has to be done.

Value

An object of class 'agnes' representing the clustering. See 'agnes.object' for details.

Author(s)

Nicolas Servant, Eleonore Gravier, Pierre Gestraud, Cecile Laurent, Caroline Paccard, Anne Biton, Jonas Mandel, Bernard Asselain, Emmanuel Barillot, Philippe Hupe

References

Kaufman, L. and Rousseeuw, P.J. (1990). Finding Groups in Data: An Introduction to Cluster Analysis. Wiley, New York.

See Also

agnes,clust.dist

Examples

1
2
3
data(marty)
c<-clustering(marty, metric="pearson", method="ward")
clustering.plot(c, title="Hierarchical Clustering\nPearson-Ward")

EMA documentation built on March 26, 2020, 8:40 p.m.