-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
FIX change the meaning of include_boundaries in check_scalar #20921
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
Conversation
ping @adrinjalali @ogrisel |
Maybe change the name to |
I find |
I think +1 for |
@@ -469,7 +469,7 @@ def fit(self, X, y=None): | |||
target_type=numbers.Real, | |||
min_val=0.5, | |||
max_val=1, | |||
closed="right", |
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.
the description of the param says "between 0.5 and 1". If 1 is excluded, maybe we should mention it there
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.
let me second check the previous code to be sure but I think it was excluded.
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.
my bad the interval is 0.5 < dumping <= 1.0 no I read it bad again, it is 0.5 <= dumping < 1.0
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.
hum, but 0.5 is the default so it should be included :)
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.
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.
hum, but 0.5 is the default so it should be included :)
Yes, I edited my answer. I confused the valid interval and the condition used to raise the error :)
gentle ping @ogrisel @jeremiedbb :) |
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, just minor comments. Thanks @glemaitre !
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
I would like to have this one for 1.0 to not release |
tagging #20965 |
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 did some manual check to be sure because it's hard to reason with double negations in the code or the heavy use of pytest.parametrize
but it works as it's supposed to.
Let's just wait for the CI to pass with the new test case I just pushed.
…learn#20921) Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
…learn#20921) Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
…learn#20921) Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
I think that the current definition of the parameter
closed
incheck_scalar
is counterintuitive.Indeed,
min_val
andmax_val
define the interval of proper value andclosed
will define whether or not to include these values. Thusleft
should includemin_val
in the interval,right
should includemax_val
in the range of correct values.