Repository navigation
Update KC metric to work on samples not leaves - #610
Merged
mergify[bot] merged 1 commit intoMay 14, 2020
Merged
Conversation
daniel-goldstein
force-pushed
the
kc-internal-samples
branch
2 times, most recently
from
May 12, 2020 20:29
98a4a88 to
0ebbe68
Compare
Codecov Report
@@ Coverage Diff @@
## master #610 +/- ##
==========================================
- Coverage 87.31% 87.30% -0.02%
==========================================
Files 22 22
Lines 16743 16733 -10
Branches 3274 3274
==========================================
- Hits 14619 14608 -11
Misses 1040 1040
- Partials 1084 1085 +1
Continue to review full report at Codecov.
|
daniel-goldstein
force-pushed
the
kc-internal-samples
branch
from
May 12, 2020 22:07
0ebbe68 to
6b78e72
Compare
jeromekelleher
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks @daniel-goldstein! Minor comments above.
daniel-goldstein
force-pushed
the
kc-internal-samples
branch
2 times, most recently
from
May 13, 2020 16:42
66c88b8 to
661aa03
Compare
jeromekelleher
approved these changes
May 14, 2020
jeromekelleher
left a comment
Member
There was a problem hiding this comment.
Looks great, thanks @daniel-goldstein!
benjeffery
force-pushed
the
kc-internal-samples
branch
from
May 14, 2020 08:47
661aa03 to
e8e3bc5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KC distance previously assumed that samples == leaves. However, the metric should measure the similarities of trees based on the relationships between the samples. This changes the metric to exclusively consider samples, not leaves. This means that internal samples no longer throw an exception and subtrees without any samples in them do not contribute to the KC distance.
It also makes more sense to focus on solely samples because the set of leaves is not consistent across trees in a tree sequence. Internal nodes that are roots in some trees and not in others affect how many leaves there are per tree. The sample set, however, is consistent across the sequence.
Resolves #575 #598