Main Content

Optimal leaf ordering for hierarchical clustering

returns an optimal leaf ordering for the hierarchical binary cluster tree, `leafOrder`

= optimalleaforder(`tree`

,`D`

)`tree`

, using the distances, `D`

. An optimal leaf ordering of a binary tree maximizes the sum of the similarities between adjacent leaves by flipping tree branches without dividing the clusters.

returns the optimal leaf ordering using one or more name-value pair arguments.`leafOrder`

= optimalleaforder(`tree`

,`D`

,`Name,Value`

)

[1] Bar-Joseph, Z., Gifford, D.K., and Jaakkola, T.S. (2001). "Fast optimal leaf ordering for hierarchical clustering." *Bioinformatics* Vol. 17, Suppl 1:S22–9. PMID: 11472989.

`dendrogram`

| `linkage`

| `pdist`