Shortest subtree that contains half the nodes of a population #1343
-
Hi All, |
Beta Was this translation helpful? Give feedback.
Answered by
petrelharp
May 7, 2021
Replies: 1 comment 1 reply
-
Trees already keep track of the number of samples below each node (and efficiently update this), so you could do something like:
or maybe more efficiently
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
stsmall
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trees already keep track of the number of samples below each node (and efficiently update this), so you could do something like:
or maybe more efficiently