This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


Agglomerate[{e1, e2, ...}]
gives an hierarchical clustering of the elements e1, e2, ....
Agglomerate[{e1->v1, e2->v2, ...}]
represents ei with vi in each cluster.
Agglomerate[{e1, e2, ...}->{v1, v2, ...}]
represents ei with vi in each cluster.
  • Agglomerate gives a Cluster object.
  • The data elements ei can be numeric lists, matrices, or tensors, lists of Boolean elements, or strings with each ei having the same dimensions.
  • The following options can be given:
DistanceFunctionAutomaticthe distance or dissimilarity measure to use
LinkageAutomaticthe clustering linkage algorithm to use
  • The setting for DistanceFunction can be any distance or dissimilarity function or a pure function f defining a distance between two values.
  • Linkage defines the intercluster dissimilarity, given the dissimilarities between member elements.
  • Possible settings for the Linkage option include:
"Single"smallest intercluster dissimilarity
"Average"average intercluster dissimilarity
"Complete"largest intercluster dissimilarity
"Weighted"weighted average intercluster dissimilarity
"Centroid"distance from cluster centroids
"Median"distance from cluster medians
"Ward"Ward's minimum variance dissimilarity
fa pure function
  • The function f defines a distance from a cluster k to the new cluster formed by fusing clusters i and j.
  • The arguments supplied to f are dik, djk, dij, ni, nj, and nk, where d is the distance between clusters and n is the number of elements in a cluster.
Obtain a cluster hierarchy from a list of numbers:
Click for copyable input