Returns fraction of overlapping subsets where self and other differ.
Names present in only one of the two trees will count as mismatches, if you don’t want this behavior, strip out the non-matching tips first.
Parameters: | other : TreeNode
exclude_absent_taxa : bool
|
---|---|
Returns: | float
|
See also
Examples
>>> from skbio.core.tree import TreeNode
>>> tree1 = TreeNode.from_newick("((a,b),(c,d));")
>>> tree2 = TreeNode.from_newick("(((a,b),c),d);")
>>> tree1.compare_subsets(tree2)
0.5