-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require leaf statistics when expanding tree #4015
Conversation
8f278ec
to
40c0f9e
Compare
40c0f9e
to
2345918
Compare
Codecov Report
@@ Coverage Diff @@
## master #4015 +/- ##
============================================
- Coverage 57.31% 57.19% -0.13%
Complexity 210 210
============================================
Files 190 190
Lines 15035 15065 +30
Branches 527 527
============================================
- Hits 8617 8616 -1
- Misses 6161 6192 +31
Partials 257 257
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I left a comment. Can you look at it? @RAMitchell
This PR extends the RegTree::ExpandNode() function to require summary statistics for the node being expanded as well as leaf weights for the left and right child. Calculating the leaf weights in advance for the child nodes required cacheing the left and right gradient sums from split calculation, so I have extended the SplitEntry class with this information.
There are several impacts to this change:
So in summary this will collapse a lot of the complexity around configuring a decision tree and will also improve performance. This is the way I have been doing things already in the GPU algorithms so it also helps me unify the code base.