Repository navigation
MRG: Fix predict_proba w/ sparse matrix regression - #1141
Merged
Merged
Conversation
Member
There was a problem hiding this comment.
I would prefer:
"""Predict decision function values for each sample in X.
X is assumed to be either sparse matrix or array-like.
"""
Keeping the first line a oneliner makes for better integration in IDEs and other documentation tools. See Multiline Docstrings in PEP-257.
Member
|
Came across this problem today. Thanks for the fix :) |
Member
|
LGTM |
Member
|
LGTM |
Member
Author
|
@larsmans good catch - thanks - I fixed the docstring |
Member
|
Ok, again LGTM. Good thing @larsmans pays more attention then I do ;) |
Member
|
👍 for merging when the docstrings are fixed. |
Member
|
@pprett Lol I thought today about changing my avatar to a photo ^^ |
larsmans
added a commit
that referenced
this pull request
Sep 14, 2012
Fix predict_proba w/ sparse matrix regression
Member
Author
Member
|
Not any more I'm not ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the
SGDClassifier.predict_probaw/ sparse matrix regression.The regression was introduced in #1030 and, thus, release 0.12 where I used
lento get the number of rows of matrix X. Even thoughtpredict_probawas covered by a number of tests, the test suite used a trick automatically test for dense and sparse inputs, however,predict_probawas not exposed to the sparse inputs.