gneiss.cluster.random_linkage

gneiss.cluster.random_linkage(n)[source]

Generates a tree with random topology.

Parameters:n (int) – Number of nodes in the tree
Returns:
  • skbio.TreeNode
  • Random tree for constructing principal balances.

Examples

>>> from gneiss.cluster import random_linkage
>>> tree = random_linkage(10)

Notes

The nodes will be labeled from 0 to n.