Agglomerative hierarchical clustering (source code)

= Agglomerative hierarchical clustering

Start with singleton clusters and repeatedly merge the two clusters with the smallest chosen intercluster dissimilarity. <Single-linkage clustering> uses the smallest cross-pair distance; <complete-linkage clustering> uses the largest. Merge heights and sensitivity to ties help assess a proposed number of groups.