Skip to content

Commit 956ac78

Browse files
committed
Update README.md
1 parent ccc4801 commit 956ac78

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ WebAssembly, with JavaScript/TypeScript wrappers for easy integration.
99
sample starts as its own cluster; at each step the two clusters with the
1010
smallest mean pairwise Euclidean distance are merged, until one cluster remains.
1111

12+
Average linkage measures inter-cluster distance as the mean of all pairwise
13+
distances. This is a middle ground between single linkage (minimum distance,
14+
prone to chaining) and complete linkage (maximum distance, forces compact
15+
clusters). For the genomics track use case — ordering samples by similarity for
16+
a heatmap — average linkage is a good default. Note that R's `hclust` defaults
17+
to `method="complete"`; use `method="average"` to get equivalent behavior.
18+
1219
This is equivalent to R's `hclust(method="average")`, with two differences: R
1320
uses the Lance-Williams recurrence for an O(n²) merge step, whereas this
1421
recomputes average distances from the original matrix each iteration (O(n³)).

0 commit comments

Comments
 (0)