Calculates the Robinson and Foulds symmetric difference
Parameters: | other : TreeNode
proportion : bool
|
---|---|
Returns: | float
|
Raises: | ValueError
|
See also
Notes
Implementation based off of code by Julia Goodrich. The original description of the algorithm can be found in [R195].
References
[R195] | (1, 2) Comparison of phylogenetic trees. Robinson and Foulds. Mathematical Biosciences. 1981. 53:131-141 |
Examples
>>> from six import StringIO
>>> from skbio import TreeNode
>>> tree1 = TreeNode.read(StringIO("((a,b),(c,d));"))
>>> tree2 = TreeNode.read(StringIO("(((a,b),c),d);"))
>>> tree1.compare_rfd(tree2)
2.0