Statistics, metrics, measurements, and values calculated on (single) trees.
Returns the B1 statistic: the reciprocal of the sum of the maximum number of nodes between each interior node and tip over all internal nodes excluding root.
Returns the $ar{N}$ statistic: the average number of nodes above a terminal node.
Returns Colless’ tree imbalance or I statistic: the sum of differences of numbers of children in left and right subtrees over all internal nodes. normalize specifies the normalization:
- “max” or True [DEFAULT]
- normalized to maximum value for tree of this size
- “yule”
- normalized to the Yule model
- “pda”
- normalized to the PDA (Proportional to Distinguishable Arrangements) model
- None or False
- no normalization
Given a tree with bipartitions encoded, and two taxa on that tree, returns the patristic distance between the two. Much more inefficient than constructing a PhylogeneticDistanceMatrix object.
Returns the gamma statistic of Pybus and Harvey (2000). This statistic is used to test for constancy of birth and death rates over the course of a phylogeny. Under the pure-birth process, the statistic should follow a standard Normal distibution: a Normal(mean=0, variance=1).
As a side effect a age attribute is added to the nodes of the tree.
Pybus and Harvey. 2000. “Testing macro-evolutionary models using incomplete molecular phylogenies.” Proc. Royal Society Series B: Biological Sciences. (267). 2267-2272
Returns the Sackin’s index: the sum of the number of ancestors for each tip of the tree. The larger the Sackin’s index, the less balanced the tree. normalize specifies the normalization:
- True [DEFAULT]
- normalized to number of leaves; this results in a value equivalent to that given by Tree.N_bar()
- “yule”
- normalized to the Yule model
- “pda”
- normalized to the PDA (Proportional to Distinguishable Arrangements) model
- None or False
- no normalization