HierarchicalClustering`
HierarchicalClustering`

Agglomerate

Agglomerate[{e1,e2,}]

gives a 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.

Details and Options

  • To use Agglomerate, you first need to load the Hierarchical Clustering Package using Needs["HierarchicalClustering`"].
  • Agglomerate gives a Cluster object.
  • The cluster hierarchy may be viewed using DendrogramPlot.
  • The data elements ei can be numbers; numeric lists, matrices, or tensors; lists of Boolean elements; or strings. If the ei are lists, matrices, or tensors, each must have the same dimensions.
  • The following options can be given:
  • DistanceFunction Automaticthe distance or dissimilarity measure to use
    Linkage Automaticthe clustering linkage algorithm to use
  • With the default setting DistanceFunction->Automatic, Agglomerate uses SquaredEuclideanDistance for numeric data, JaccardDissimilarity for Boolean data, and EditDistance for string data.
  • 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
    "WeightedAverage"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.

Examples

open allclose all

Basic Examples  (1)

Obtain a cluster hierarchy from a list of numbers:

Options  (2)

DistanceFunction  (1)

Cluster hierarchy using ManhattanDistance:

Linkage  (1)

Cluster hierarchy using Ward's linkage:

Wolfram Research (2007), Agglomerate, Wolfram Language function, https://reference.wolfram.com/language/HierarchicalClustering/ref/Agglomerate.html.

Text

Wolfram Research (2007), Agglomerate, Wolfram Language function, https://reference.wolfram.com/language/HierarchicalClustering/ref/Agglomerate.html.

CMS

Wolfram Language. 2007. "Agglomerate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/HierarchicalClustering/ref/Agglomerate.html.

APA

Wolfram Language. (2007). Agglomerate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/HierarchicalClustering/ref/Agglomerate.html

BibTeX

@misc{reference.wolfram_2024_agglomerate, author="Wolfram Research", title="{Agglomerate}", year="2007", howpublished="\url{https://reference.wolfram.com/language/HierarchicalClustering/ref/Agglomerate.html}", note=[Accessed: 30-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_agglomerate, organization={Wolfram Research}, title={Agglomerate}, year={2007}, url={https://reference.wolfram.com/language/HierarchicalClustering/ref/Agglomerate.html}, note=[Accessed: 30-December-2024 ]}