-
-
Notifications
You must be signed in to change notification settings - Fork 25.4k
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
Apparent mismatch between possible arguments for average
in the base stochastic gradient class
#28389
Comments
Thanks for the report @bmgdc. Looking at the code, |
ping @glemaitre @betatim who originaly discussed that in #28373 (comment), what's your opinion ? |
Maybe this is better to keep as-is. Otherwise, we might start to break some code and request a boolean in the previous case of 0. This is maybe not worth it. We might want to have a comment just to document this legacy behaviour. |
or deprecate 0 ? Since we deprecated integers for the boolean constraint to make boolean parameters require an true boolean, deprecating 0 would make it consistent with the rest of the code base. |
So let's make it consistent then and ask to pass False instead of 0 |
Describe the bug
Raised in #28373 (comment).
The
average
parameter inBaseSGD
(which propagates toSGDRegressor
,SGDClassifier
andSGDOneClassSVM
) is constrained to non-negative integers or boolean values:"average": [Interval(Integral, 0, None, closed="left"), bool, np.bool_]
.This seems to be at odds with
average=0
seemingly meaningaverage=True
which contradicts the typical truth-evaluation of0
.Steps/Code to Reproduce
Expected Results
Actual Results
Versions
This is in the main branch right now.
The text was updated successfully, but these errors were encountered: