Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Hierarchical clustering and phylogenetic trees

ProblemBuild a tree of nested clusters by repeatedly merging the two closest groups; reconstruct evolutionary trees from distances between species
Devised byPeter Sneath (1957), single linkage; Thorvald Sørensen (1948), complete linkage; Robert Sokal and Charles Michener (1958), average linkage (UPGMA); Joe Ward (1963), minimum variance; Godfrey Lance and William Williams (1967), the unified update; Naruya Saitou and Masatoshi Nei (1987), neighbour joining; Ziv Bar-Joseph, David Gifford and Tommi Jaakkola (2001), optimal leaf ordering
AccuracyExact for the stated criteria. UPGMA recovers a tree exactly from ultrametric distances, neighbour joining from additive ones
Cost time and memory, from a distance matrix
Read firstk-means and k-medoids
APIagglomerate, Linkage, Dendrogram (cut_clusters, cut_distance, cophenetic_distances, inconsistent, optimal_leaf_ordering, leaves, to_linkage_matrix, from_linkage_matrix), whiten, HierarchicalClustering; upgma, neighbor_joining, PhylogeneticTree

Overview

Agglomerative hierarchical clustering starts with every point in its own cluster and repeatedly merges the two closest clusters until one remains. The record of merges is a binary tree, the dendrogram, in which each merge is drawn at the distance where it happened. Cutting the tree at a height, or where it has branches, gives a flat clustering, so a single fit serves every . The linkage defines the distance between clusters, and it shapes the result as much as the data do.

The same procedure, read as a model of evolution, reconstructs phylogenetic trees from distances between species or gene sequences. Average linkage is UPGMA, the classical method under a constant rate of evolution. Neighbour joining drops the assumption of a constant rate and remains one of the most used tree-building methods in biology.

Where it is used

Hierarchical clustering shows how groups nest.

  • Biology. Phylogenetic trees of species, built from distances between DNA sequences, and clustering of gene-expression profiles.
  • Document and customer grouping. A dendrogram lets you choose the number of groups after looking.
  • Image segmentation and taxonomy. Merging similar regions step by step.
  • Linkage choices. Single, complete, average and Ward linkage give different cluster shapes.

History

Numerical taxonomy in the 1950s needed objective classifications of organisms. Thorvald Sørensen (1948) grouped plant communities by complete linkage, Peter Sneath (1957) classified bacteria by single linkage, and Robert Sokal and Charles Michener (1958) introduced average linkage, later named UPGMA. Joe Ward (1963) merged the pair that least increases the within-cluster variance. Godfrey Lance and William Williams (1967) showed that all of these update the inter-cluster distances by one formula. Naruya Saitou and Masatoshi Nei (1987) devised neighbour joining for molecular phylogenetics; James Studier and Karl Keppler (1988) gave its form.

The idea

Linkage criteria

Starting from point distances , the distance between clusters and is

  • single: , the closest pair;
  • complete: , the farthest pair;
  • average (UPGMA): the mean of over all pairs;
  • Ward: the increase in the within-cluster sum of squares caused by merging, (Euclidean data only).

There is no need to go back to the points after a merge. When and merge, the distance from the new cluster to any other cluster follows from the old ones by the Lance-Williams update

Single linkage has , (giving the minimum), complete linkage , and average linkage . Ward’s method applies the update to squared distances with and .

Reading a dendrogram

The same 24 points from three blobs, clustered with three linkages (leaves coloured by their true blob):

Long vertical branches mean well-separated clusters: cutting across the longest ones gives the natural number of groups. Ward’s tree shows three groups clearly. Single linkage merges at small heights everywhere and is the least decisive. Merge heights never decrease for these four linkages, so the dendrogram has no inversions. The cophenetic distance between two points, the height at which they first join, is then an ultrametric: for all .

Chaining and compactness

Single linkage follows chains of close points, so it separates the two moons perfectly. The same property is a weakness: a thin bridge of points between two blobs is enough to join them. Complete, average and Ward linkage prefer compact clusters and are not fooled by the bridge, but they cut the moons like k-means:

Table 12.5. Linkage methods on two awkward data sets.

linkagetwo moons (ARI)two blobs joined by a bridge of 20 points (ARI on the blobs)
single1.0000.000
complete0.2101.000
average0.3991.000
Ward0.2031.000

Checking against SciPy

Merge heights from the library agree with scipy.cluster.hierarchy.linkage to rounding error:

Table 12.6. Clustering and reduction routines against SciPy and scikit-learn.

datacompared withmerge heights or variances (largest relative difference)leading two principal axes (largest difference)
three blobs, 30 pointssingle linkage (SciPy)0.0e0—
three blobs, 30 pointscomplete linkage (SciPy)0.0e0—
three blobs, 30 pointsaverage linkage (SciPy)1.2e-16—
three blobs, 30 pointsward linkage (SciPy)2.0e-16—
uniform cube, 25 pointssingle linkage (SciPy)0.0e0—
uniform cube, 25 pointscomplete linkage (SciPy)0.0e0—
uniform cube, 25 pointsaverage linkage (SciPy)1.8e-16—
uniform cube, 25 pointsward linkage (SciPy)3.2e-16—
two factors in five dimensionsPCA (NumPy SVD)8.2e-146.7e-16

The last row belongs to the PCA entry.

UPGMA and the molecular clock

If species evolve at a constant rate (a molecular clock), the distance between two species is twice the time since their common ancestor. The distances are then ultrametric, and the tree has all leaves at the same depth. UPGMA is average linkage that places each merge node at half the merge distance. Each branch length is the difference in height between a node and its child. Given ultrametric distances, UPGMA rebuilds the tree exactly.

Neighbour joining

Rates do vary between lineages. A fast-evolving species is far from everything, and UPGMA wrongly groups slow species together because they are close to each other. Neighbour joining corrects for this using each taxon’s net divergence . With active taxa, it joins the pair minimising

which is the pair whose joining gives the shortest total tree length. The new node gets branch lengths and , and distances to the others. If the distances are additive, meaning they are the path lengths of some tree, neighbour joining recovers that tree exactly (Studier and Keppler; Atteson 1999 for noisy distances). The tree is unrooted, since distances alone do not reveal where the root is.

On random trees with 12 leaves, the largest relative error in the reconstructed path lengths was:

Table 12.7. Recovery of random trees by UPGMA and neighbour joining.

true tree (12 leaves, 50 random trees)UPGMAneighbour joining
molecular clock (ultrametric)4.6e-166.0e-16
unequal rates (additive)2.0e01.9e-15
unequal rates, 5% noise2.1e01.8e-1

With a clock, both methods are exact. Without one, UPGMA’s errors exceed 100% while neighbour joining stays exact. With 5% noise in the distances, neither tree fits exactly; neighbour joining’s worst error over all pairs and trials is 18%, against UPGMA’s 210%.

Algorithm

Agglomerative clustering. Input: the matrix of distances and a linkage.

  1. Start with every point as its own cluster.
  2. Find the closest pair of clusters , by scanning the matrix.
  3. Record the merge: the two clusters joined, the height and the size of the new cluster.
  4. Replace the rows and columns of and by a single one for , whose distance to every other cluster comes from , and by the Lance-Williams formula.
  5. Repeat from step 2 until one cluster remains, after merges.

The list of merges is the dendrogram. Cutting it at a height, or into a given number of clusters, gives a flat clustering. A scan of remaining clusters costs , so the whole procedure is .

UPGMA is the same procedure with average linkage, recording each merge as a tree node at height .

Neighbour joining. Input: a matrix of distances between taxa. While more than two remain, with the number remaining:

  1. compute the net divergence of each taxon;
  2. find the pair minimising ;
  3. create a new node joined to and by branches of the lengths and given above;
  4. compute the distance from to every other taxon , , and replace and by .

Finally join the last two nodes by a branch of length equal to their distance. This too is .

Implementation

    while ids.len() > 1 {
        let m = ids.len();
        let (mut bi, mut bj, mut best) = (0, 1, f64::INFINITY);
        for i in 0..m {
            for j in i + 1..m {
                if d[i][j] < best {
                    (bi, bj, best) = (i, j, d[i][j]);
                }
            }
        }
        let (si, sj) = (sizes[bi] as f64, sizes[bj] as f64);
        let new_row: Vec<f64> = (0..m)
            .map(|k| {
                let sk = sizes[k] as f64;
                match linkage {
                    Linkage::Single => d[bi][k].min(d[bj][k]),
                    Linkage::Complete => d[bi][k].max(d[bj][k]),
                    Linkage::Average => (si * d[bi][k] + sj * d[bj][k]) / (si + sj),
                    Linkage::Ward => ((si + sk) * d[bi][k] + (sj + sk) * d[bj][k] - sk * d[bi][bj]) / (si + sj + sk),
                }
            })
            .collect();
        merges.push(Merge { a: ids[bi], b: ids[bj], distance: if linkage == Linkage::Ward { best.sqrt() } else { best }, size: sizes[bi] + sizes[bj] });
        for k in 0..m {
            d[bi][k] = new_row[k];
            d[k][bi] = new_row[k];
        }
        d[bi][bi] = 0.0;
        d.remove(bj);
        d.iter_mut().for_each(|r| {
            r.remove(bj);
        });
        sizes[bi] += sizes[bj];
        sizes.remove(bj);
        ids[bi] = n + merges.len() - 1;
        ids.remove(bj);
    }
    while active.len() > 2 {
        let m = active.len();
        let r: Vec<f64> = (0..m).map(|i| (0..m).map(|j| d[i][j]).sum()).collect();
        let (mut bi, mut bj, mut best) = (0, 1, f64::INFINITY);
        for i in 0..m {
            for j in i + 1..m {
                let q = (m as f64 - 2.0) * d[i][j] - r[i] - r[j];
                if q < best {
                    (bi, bj, best) = (i, j, q);
                }
            }
        }
        let li = 0.5 * d[bi][bj] + (r[bi] - r[bj]) / (2.0 * (m as f64 - 2.0));
        let lj = d[bi][bj] - li;
        edges.push((next, active[bi], li));
        edges.push((next, active[bj], lj));
        let merged: Vec<f64> = (0..m).map(|k| 0.5 * (d[bi][k] + d[bj][k] - d[bi][bj])).collect();
        for k in 0..m {
            d[bi][k] = merged[k];
            d[k][bi] = merged[k];
        }
        d[bi][bi] = 0.0;
        d.remove(bj);
        d.iter_mut().for_each(|row| {
            row.remove(bj);
        });
        active.remove(bj);
        active[bi] = next;
        next += 1;
    }
    edges.push((active[0], active[1], d[0][1]));
  • Merges follow SciPy’s numbering: merge creates cluster .
  • Ward heights are reported as , where is the increase in the sum of squares, as in SciPy: two single points at distance merge at height .
  • cut_clusters(k) applies the first merges; cut_distance(h) applies every merge at height at most .
  • Neighbour joining can produce small negative branch lengths from non-additive data; they are kept as computed.
  • PhylogeneticTree::to_newick writes the standard Newick format, which tree viewers read.

In practice

//! Agglomerative clustering, dendrogram cuts, and phylogenetic trees by UPGMA and neighbour joining.

use lib_jsl_core::R2D;
use lib_jsl_machine_learning::common::pairwise_distances;
use lib_jsl_machine_learning::supervised::classification::{neighbor_joining, upgma};
use lib_jsl_machine_learning::unsupervised::clustering::{Linkage, agglomerate};
use ndarray::arr2;

fn main() {
    // Points on a line at 0, 1, 5, 6 and 20.
    let x = arr2(&[[0.0], [1.0], [5.0], [6.0], [20.0]]);
    for linkage in [Linkage::Single, Linkage::Complete, Linkage::Average, Linkage::Ward] {
        let tree = agglomerate(pairwise_distances(x.view()).view(), linkage).unwrap();
        let heights: Vec<String> = tree.merges.iter().map(|m| format!("{:.2}", m.distance)).collect();
        println!("{:<8} merge heights [{}], three clusters {:?}", format!("{linkage:?}"), heights.join(", "), tree.cut_clusters(3).unwrap());
    }

    // An additive (but not ultrametric) tree: A and B evolve faster than C and D.
    //   A:4, B:5 join at u; C:1, D:2 join at v; u and v joined by a branch of length 2.
    let d: R2D = arr2(&[[0.0, 9.0, 7.0, 8.0], [9.0, 0.0, 8.0, 9.0], [7.0, 8.0, 0.0, 3.0], [8.0, 9.0, 3.0, 0.0]]);
    let names = ["A", "B", "C", "D"];
    let nj = neighbor_joining(d.view(), &names).unwrap();
    let up = upgma(d.view(), &names).unwrap();
    println!("neighbour joining: {}", nj.to_newick());
    println!("UPGMA:             {}", up.to_newick());
    let err = |t: &R2D| t.iter().zip(d.iter()).map(|(a, b)| (a - b).abs()).fold(0.0, f64::max);
    println!("largest path-length error: NJ {:.1e}, UPGMA {:.2}", err(&nj.patristic_distances()), err(&up.patristic_distances()));
}
Single   merge heights [1.00, 1.00, 4.00, 14.00], three clusters [0, 0, 1, 1, 2]
Complete merge heights [1.00, 1.00, 6.00, 20.00], three clusters [0, 0, 1, 1, 2]
Average  merge heights [1.00, 1.00, 5.00, 17.00], three clusters [0, 0, 1, 1, 2]
Ward     merge heights [1.00, 1.00, 7.07, 21.50], three clusters [0, 0, 1, 1, 2]
neighbour joining: ((A:4.00000,B:5.00000):2.00000,C:1.00000,D:2.00000);
UPGMA:             ((A:3.75000,(C:1.50000,D:1.50000):2.25000):0.58333,B:4.33333);
largest path-length error: NJ 0.0e0, UPGMA 0.67

Neighbour joining recovers the true tree, with A and B as neighbours, from its additive distances. UPGMA groups A with the slowly evolving C and D, because A is closer to them (7 and 8) than to its true sister B (9).

Inconsistency and leaf order

Three tools from scipy.cluster work on a finished tree.

  • Whitening. whiten divides each feature by its standard deviation before distances are computed, so that a feature measured on a larger scale does not dominate them.
  • The inconsistency coefficient. For each merge, inconsistent(depth) collects the heights of the merges at most depth − 1 levels below it, itself included. It reports their mean , standard deviation and number, and the coefficient . A merge much higher than those beneath it joins two well-separated groups, so a large coefficient suggests where to cut (Jain and Dubes, 1988).
  • Optimal leaf ordering. A tree on leaves can be drawn in ways, one for each choice of which child goes left at every merge. optimal_leaf_ordering picks the drawing whose leaf sequence has the smallest total distance between neighbours, so that similar points sit together and a heat map of the reordered data shows its blocks.

The search over all drawings is a dynamic programme (Bar-Joseph, Gifford and Jaakkola, 2001). For a merge with children and , let be the shortest path through the leaves of that starts at leaf of and ends at leaf of . It is where runs over the leaves of that can end a path starting at , and over the leaves of that can start one ending at . Minimising first over for each pair brings the whole computation to .

    /// The inconsistency statistics of every merge (SciPy's `inconsistent(Z, d)`): row `i` holds
    /// the mean and standard deviation of the heights of the merges at most `depth − 1` levels
    /// below merge `i` (itself included), their number, and the inconsistency coefficient
    /// `(h_i − mean) / std` (0 when the deviation is 0). A large coefficient marks a merge much
    /// higher than those beneath it: a natural place to cut.
    pub fn inconsistent(&self, depth: usize) -> Result<R2D, ErrorsJSL> {
        if depth == 0 {
            return Err(ErrorsJSL::InvalidInputRange("The depth must be at least 1."));
        }
        let n = self.points;
        let mut r = R2D::zeros((self.merges.len(), 4));
        let mut level = Vec::new();
        let mut next = Vec::new();
        for (i, m) in self.merges.iter().enumerate() {
            let (mut sum, mut sq, mut count) = (0.0, 0.0, 0usize);
            level.clear();
            level.push(i);
            for d in 0..depth {
                next.clear();
                for &j in &level {
                    let h = self.merges[j].distance;
                    sum += h;
                    sq += h * h;
                    count += 1;
                    if d + 1 < depth {
                        for c in [self.merges[j].a, self.merges[j].b] {
                            if c >= n {
                                next.push(c - n);
                            }
                        }
                    }
                }
                std::mem::swap(&mut level, &mut next);
                if level.is_empty() {
                    break;
                }
            }
            let k = count as f64;
            let mean = sum / k;
            let var = (sq - sum * sum / k) / if count < 2 { k } else { k - 1.0 };
            r[[i, 0]] = mean;
            r[[i, 2]] = k;
            if var > 0.0 {
                let s = var.sqrt();
                r[[i, 1]] = s;
                r[[i, 3]] = (m.distance - mean) / s;
            }
        }
        Ok(r)
    }
    /// The same tree with the two children of each merge swapped where needed so that the sum
    /// of the distances between neighbouring leaves is as small as possible (SciPy's
    /// `optimal_leaf_ordering`; Bar-Joseph, Gifford and Jaakkola's dynamic programme, `O(n³)`
    /// time and `O(n²)` memory). `distances` is the full matrix the tree was built from.
    pub fn optimal_leaf_ordering(&self, distances: VR2D) -> Result<Dendrogram, ErrorsJSL> {
        let n = self.points;
        if distances.nrows() != n || distances.ncols() != n {
            return Err(ErrorsJSL::InvalidInputRange("The distance matrix must be n × n for a tree on n points."));
        }
        if self.merges.len() + 1 != n {
            return Err(ErrorsJSL::InvalidInputRange("The tree must join all its points."));
        }
        if n <= 2 {
            return Ok(self.clone());
        }
        // Leaves of every cluster.
        let mut members: Vec<Vec<usize>> = (0..n).map(|p| vec![p]).collect();
        for m in &self.merges {
            let joined: Vec<usize> = members[m.a].iter().chain(&members[m.b]).copied().collect();
            members.push(joined);
        }
        // best[u][w]: the smallest path length through the leaves of the cluster where u and w
        // first meet, starting at u and ending at w.
        let mut best = vec![vec![0.0f64; n]; n];
        for m in &self.merges {
            let (l, r) = (&members[m.a], &members[m.b]);
            // Leaves of a child that can end an ordering of that child starting at `u`: those in
            // the other grandchild (or u itself for a single leaf).
            let ends = |c: usize, u: usize| -> Vec<usize> {
                if c < n {
                    return vec![u];
                }
                let mc = &self.merges[c - n];
                if members[mc.a].contains(&u) { members[mc.b].clone() } else { members[mc.a].clone() }
            };
            // t[u][k] = min over m (end of the left part starting at u) of best[u][m] + D[m][k].
            let mut t = vec![vec![f64::INFINITY; r.len()]; l.len()];
            for (iu, &u) in l.iter().enumerate() {
                let em = ends(m.a, u);
                for (ik, &k) in r.iter().enumerate() {
                    t[iu][ik] = em.iter().map(|&mm| best[u][mm] + distances[[mm, k]]).fold(f64::INFINITY, f64::min);
                }
            }
            let r_index: std::collections::HashMap<usize, usize> = r.iter().enumerate().map(|(i, &k)| (k, i)).collect();
            for (iu, &u) in l.iter().enumerate() {
                for &w in r.iter() {
                    let ek = ends(m.b, w);
                    let v = ek.iter().map(|&k| t[iu][r_index[&k]] + best[k][w]).fold(f64::INFINITY, f64::min);
                    best[u][w] = v;
                    best[w][u] = v;
                }
            }
        }
        // Reconstruct from the root: choose the ends, then recurse.
        let root = n + self.merges.len() - 1;
        let mr = &self.merges[root - n];
        let (mut bu, mut bw, mut bv) = (0, 0, f64::INFINITY);
        for &u in &members[mr.a] {
            for &w in &members[mr.b] {
                if best[u][w] < bv {
                    (bu, bw, bv) = (u, w, best[u][w]);
                }
            }
        }
        let mut out = self.clone();
        // Work list of (cluster, leaf that must come first, leaf that must come last).
        let mut work = vec![(root, bu, bw)];
        while let Some((c, u, w)) = work.pop() {
            if c < n {
                continue;
            }
            let idx = c - n;
            let mut m = self.merges[idx];
            if !members[m.a].contains(&u) {
                std::mem::swap(&mut m.a, &mut m.b);
            }
            out.merges[idx].a = m.a;
            out.merges[idx].b = m.b;
            // Find the inner ends m_end (in a) and k (in b) achieving best[u][w].
            let ends = |c: usize, x: usize| -> Vec<usize> {
                if c < n {
                    return vec![x];
                }
                let mc = &self.merges[c - n];
                if members[mc.a].contains(&x) { members[mc.b].clone() } else { members[mc.a].clone() }
            };
            let (ea, eb) = (ends(m.a, u), ends(m.b, w));
            let (mut bm, mut bk, mut bv) = (u, w, f64::INFINITY);
            for &mm in &ea {
                for &k in &eb {
                    let v = best[u][mm] + distances[[mm, k]] + best[k][w];
                    if v < bv {
                        (bm, bk, bv) = (mm, k, v);
                    }
                }
            }
            work.push((m.a, u, bm));
            work.push((m.b, bk, w));
        }
        Ok(out)
    }

The references are from SciPy 1.17.1, written by book/generator/data/make_sys215_refs.py. The trees are those of 36 points in three groups, with the second feature on a ten times larger scale:

Table 12.8. Whitening, inconsistency coefficients, leaf order and optimal leaf ordering against SciPy.

CaseTree (heights, cophenetic distances)inconsistent, depths 1–4leaves_listoptimal_leaf_ordering: leaf path length, library / SciPy
whiten, 36 × 2 (features on scales 1 and 10)0———
single linkage, 36 points05e-14identical63.7451 / 65.1068
complete linkage, 36 points04e-15identical65.2592 / 66.2240
average linkage, 36 points4e-154e-15identical65.2592 / 66.2562
ward linkage, 36 points7e-152e-14identical65.2592 / 66.2562

The trees, the inconsistency statistics and the leaf order agree with SciPy’s to rounding. The optimal leaf orderings do not: the library’s leaf paths are 1–2 % shorter than SciPy’s for every linkage.

The library’s result is the true optimum. Its unit tests compare it with an exhaustive search over all drawings of 44 trees, and an independent Python implementation of the recurrence gives the same lengths here. SciPy’s optimal_leaf_ordering returned a longer ordering than the exhaustive search for 131 of 200 random 9-point trees, so it does not always find the optimum.

Figure 12.2. The average-linkage tree of the 36 points, drawn upward as built and downward in optimal leaf order. Both are the same tree; reordering shortens the path through the leaves from 110 to 65.

Strengths

  • One fit gives clusterings at every scale, and the dendrogram shows how clear the grouping is.
  • Works from any distance matrix; single linkage finds non-convex clusters, Ward finds compact ones.
  • Neighbour joining is fast, needs no clock, and is exact for additive distances.

Weaknesses

  • memory and time limit the method to a few thousand points.
  • Merges are greedy and never undone; the result depends heavily on the linkage.
  • Distance-based trees ignore the sequence data’s details; likelihood and Bayesian methods are more accurate for phylogenetics.

Exercises

  1. Verify the Lance-Williams coefficients for single, complete and average linkage.
  2. Show that single-linkage clustering is equivalent to building a minimum spanning tree and deleting its longest edges.
  3. Show that Ward’s merge cost equals .
  4. Prove that UPGMA recovers an ultrametric tree exactly.
  5. Show that the four-point condition holds for path lengths in a tree.
  6. Centroid linkage (distance between cluster means) can produce inversions. Find three points in the plane where it does.
Hints and answers
  1. When clusters and merge, : single linkage has , ; complete has , ; average has and .
  2. Kruskal’s algorithm adds the lightest edges in order, and single linkage merges the two closest clusters in the same order; cutting into clusters removes the longest MST edges.
  3. The increase of the within-cluster sum of squares on merging and is , with the merged mean; substituting gives the stated formula.
  4. In an ultrametric every triangle is isosceles with the two largest sides equal. By induction on the merges, UPGMA’s average distance between the two merged groups equals every pairwise distance between them.
  5. Along tree paths is the sum of two disjoint paths when is the topology; the other two sums then share the middle edge and are equal and larger.
  6. Take an equilateral triangle with side 1. Two vertices merge at distance 1, and the centroid at their midpoint is only from the third vertex: the next merge height is smaller than the previous one.

Further reading

  • G. N. Lance and W. T. Williams, “A general theory of classificatory sorting strategies. 1. Hierarchical systems”, The Computer Journal 9 (1967) 373–380.
  • J. H. Ward, “Hierarchical grouping to optimize an objective function”, Journal of the American Statistical Association 58 (1963) 236–244.
  • N. Saitou and M. Nei, “The neighbor-joining method: a new method for reconstructing phylogenetic trees”, Molecular Biology and Evolution 4 (1987) 406–425.
  • J. Felsenstein, Inferring Phylogenies, Sinauer, 2004, chapter 11.
  • D. Müllner, “Modern hierarchical, agglomerative clustering algorithms”, arXiv:1109.2378, 2011.
  • Z. Bar-Joseph, D. K. Gifford and T. S. Jaakkola, “Fast optimal leaf ordering for hierarchical clustering”, Bioinformatics 17 (2001) S22–S29.
  • A. K. Jain and R. C. Dubes, Algorithms for Clustering Data, Prentice Hall (1988), for the inconsistency coefficient.