-
-
Notifications
You must be signed in to change notification settings - Fork 26k
[MRG] LogisticCV Score Function Fixed #8529
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
sklearn/linear_model/logistic.py
Outdated
@@ -1542,6 +1542,7 @@ def fit(self, X, y, sample_weight=None): | |||
self : object | |||
Returns self. | |||
""" | |||
|
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.
can you remove this empty line?
sklearn/linear_model/logistic.py
Outdated
"" | ||
|
||
warnings.warn('The score function always returns mean accuracy due to' | ||
' a bug in scikit-learn. Refer the documentation for more details.') |
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.
This should be indented 4 spaces. Also, I don't think this is a bug, it's more an unexpected behavior.
"""Returns the mean accuracy on given test data and labels. | ||
|
||
Due to a bug in scikit-learn this method always returns mean accuracy. | ||
This will be fixed in version 0.20. For now you can externally call the |
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.
Should specify how it will be "fixed". Perhaps "this will be changed to respect the scoring
parameter where provided".
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.
@jnothman Thank you for your comment. It is my first contribution to the community and I will try my best to contribute more in the future.
fixed in #11192 |
Reference Issue
Fixes #8274
What does this implement/fix? Explain your changes.
LogisticCV score function has been fixed due to a Scikit-Learn bug.
Any other comments?