-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
cross_val_predict should work for sparse y
#5132
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
Comments
I would like to take this one up. Should I go ahead with this? |
Sure, thanks On 18 August 2015 at 20:53, Buddha Prakash notifications@github.com wrote:
|
Sorry for the late reply, I got caught up with some other work. @jnothman Can you please clarify. Can you provide an example dataset so that I can reproduce this case? |
Currently we use sparse format optionally as output of multilabel On 24 August 2015 at 03:09, Buddha Prakash notifications@github.com wrote:
|
Hey guys, I am also interested in taking a stab at this and am not sure either what the problem exactly is. It looks like the current implementation is able to handle sparse y. This is the code I ran:
This does generate a reasonable cross-validated prediction of 'y' in a sparse form. I'm not sure if I am missing anything, and my apologies for being a newbie:) Thanks |
Running you snippet, both y and predicted are plain numpy arrays, not scipy On 26 August 2015 at 06:00, jackzhang84 notifications@github.com wrote:
|
Opened a pull request #5161 @jackzhang84 The problem is that np.concatenate() doesn't support concatenation of sparse matrices and hence cross_val_predict gives an error for sparse prediction matrix. |
[MRG+1] Add check for sparse prediction in cross_val_predict (fixes #5132)
Currently it uses
np.concatenate
to merge predictions, but predictions could be sparse matrices.The text was updated successfully, but these errors were encountered: