Skip to content
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

Fix incorrect minimum value in quantile generation #3167

Merged
merged 1 commit into from
Mar 14, 2018

Conversation

RAMitchell
Copy link
Member

There was a bug for both hist and gpu_hist where the lowest quantile could have an upper bound of zero and lower bound of zero. This fixes it so that the minimum value is strictly less than all other cut values.

@codecov-io
Copy link

codecov-io commented Mar 14, 2018

Codecov Report

Merging #3167 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3167   +/-   ##
=========================================
  Coverage     45.29%   45.29%           
  Complexity      228      228           
=========================================
  Files           166      166           
  Lines         12901    12901           
  Branches        466      466           
=========================================
  Hits           5844     5844           
  Misses         6865     6865           
  Partials        192      192
Impacted Files Coverage Δ Complexity Δ
src/common/hist_util.cc 0.3% <0%> (ø) 0 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 706be4e...23431fa. Read the comment docs.

Copy link
Collaborator

@hcho3 hcho3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Did you find an actual example where this caused a problem?

@RAMitchell
Copy link
Member Author

It can be reproduced by running the script at #3156.

Specifically it occurred in a column that only contained the values 0 and nan.

@hcho3
Copy link
Collaborator

hcho3 commented Mar 14, 2018

I see. The old behavior doesn't work when the minimum value is exactly zero. I'll approve this PR.

@hcho3 hcho3 merged commit 7a81c87 into dmlc:master Mar 14, 2018
@RAMitchell RAMitchell deleted the instability-fix branch December 6, 2018 19:34
@lock lock bot locked as resolved and limited conversation to collaborators Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants