-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Fix for passing pandas series in sample_weights
in RidgeCV
leading to an error(#5606)
#6307
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
This will work for this particular case, but it only fixes one of the many cases where this needs to be done. I think a more comprehensive fix would be this:
I realize that's a much bigger job than just fixing |
As far as the common tests for |
@jakevdp That sounds like a good idea. I would like to work on that although it would take quite some time before I make something substantial as I think I have a lot to understand about code base and |
Used the validation change in linear_model/ridge
@jakevdp I have created a new
If you think the current structure is fine, I can go ahead and use it in other estimators. Also do you think we need to check for anything else other than |
Hmm... I'm not certain about this. The default value of False seems a bit problematic. Maybe it would be cleaner to have a separate function for the case of checking X, y, and sample_weights? |
@jakevdp I agree that |
I'm not certain a separate function just for X, y, sample_weights = check_X_y_sample_weights(X, y, sample_weights) But now that I write this out, it does look quite ugly. The other thing I thought of is that we could use the
|
@jakevdp Is there any specific reason why we are using |
We want a sentinel value that the user could never accidentally pass. If we use Doing a |
@jakevdp Thanks for explaining. I now understand what you meant in the previous comment. |
This looks like a good fix. Could you please rebase and add a test? There should be a test in |
I think #5642 should be preferred as more general. |
@jnothman I agree. Sorry, I'm way less on top of things than you ;) |
Alright. Should I close this PR in favor of #5642? On 09-Oct-2016 12:15 am, "Andreas Mueller" notifications@github.com wrote:
|
Usually we wait until one is merged, but whatever you like. |
Fixed by #7825 |
Currently there seems to be no tests for checking
pandas
compatibility, and as @jnothman mentioned in the issue perhaps tests for various cases checking for compatibility needs to be added.@jakevdp @amueller @jnothman reviews please, and let me know what should be done.