MatArray Toolbox
  Go to function:
    Search    Help Desk 
orderleaves    Examples   See Also

Orders the leaves in a hiearchical clustering created with hierarc so that the sum of the distances between adjacent leaves is minimal.

Syntax

Description

The hierarchical clusterings generated by hierarc are an arbitrary choice amongst a family of similar clusterings, obtained by permutation of the left and right leaves at any nodes. orderleaves searches for the clustering similar to tree for which the sum of the distances between adjacent leaves, as determined by the distance matrix dist, is minimal. The C code is based on the program of Ziv Bar-Joseph, see the reference for details.

The functions prints the initial sum of the distances, the optimal sum of distances and the improvement as a percentage in the command window.

Note: the function is implemented as a mex-file, and as such cannot be stopped once it has started. You should make sure you are ready to wait before you launch it. As a first approximation, with 1000 leaves the routine takes about 10secs and uses about 100Megs of RAM. The time complexity is O(n^3) and the space complexity is O(n^2). Make especially sure enough RAM is available, or be prepared to either wait for ages or kill MatLab.

Examples

Initial distance: Rearrange the tree in order to minimize this distance: The initial distance corresponds to the distance calculated before. The optimal distance can be verified on the new tree:

See Also

clustTV, disptree, dl2c, hierarc

References

[1] Bar-Joseph, Z., Gifford, D.K. and Jaakkola, T.S., "Fast optimal leaf ordering for hierarchical clustering," Proc. 9th ISMB, Bioinformatics, 17, S22-S29 (2001)



[ Previous | Help Desk | Next ]