-
Notifications
You must be signed in to change notification settings - Fork 2k
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
PUBDEV-7241 Monotone Quantile Constraints #4719
PUBDEV-7241 Monotone Quantile Constraints #4719
Conversation
14bb8b7
to
4db7c54
Compare
h2o-docs/src/product/data-science/algo-params/monotone_constraints.rst
Outdated
Show resolved
Hide resolved
_vals[_vals_dim*b + 0] += weight; | ||
_vals[_vals_dim*b + 1] += wy; | ||
_vals[_vals_dim*b + 2] += wyy; | ||
int binDimStart = _vals_dim*b; |
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.
imho this reads worse than before, maybe if you made binDimStart final it would look better
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.
So I made the binDimStart
final. Maybe this reads worse, however, it is better from a code perspective. But I can change it back if you want @michalkurka.
// left tree prediction quantile | ||
if (bin <= b) { | ||
if (bin == 1) { | ||
ratio = 100 / wlo[b]; |
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.
Where is the 100 number coming from?
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.
Good question! I calculated the percentile instead of quantile here. My mistake. I fixed it and run tests and demo and, it looks good. The calculation of the quantile is similar, so the performance should be the same.
First read - LGTM, since you are touching performance optimized code in DTree - it would be a good idea to re-run benchmarks on this branch before merging this. |
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
0537e0c
to
f630970
Compare
PUBDEV-7241 * implement histogram approximation quantile monotone constraints * reset quantiles correctly with respect constraints in subtrees * add quatnile to MC documentation, add demo * add Java, Python and R tests (cherry picked from commit e1ab951)
JIRA: https://0xdata.atlassian.net/browse/PUBDEV-7241