skbio.tree.TreeNode.compare_rfd¶
- TreeNode.compare_rfd(other, proportion=False)[source]¶
Calculates the Robinson and Foulds symmetric difference
State: Experimental as of 0.4.0.
- Parameters:
- Returns:
The distance between the trees
- Return type:
Notes
Implementation based off of code by Julia Goodrich. The original description of the algorithm can be found in [1].
- Raises:
ValueError – If the tip names between self and other are equal.
See also
References
Examples
>>> from skbio import TreeNode >>> tree1 = TreeNode.read(["((a,b),(c,d));"]) >>> tree2 = TreeNode.read(["(((a,b),c),d);"]) >>> tree1.compare_rfd(tree2) 2.0