[MRG+2]: Fix Ridge GCV with centered data#6178
Merged
ogrisel merged 11 commits intoscikit-learn:masterfrom Oct 5, 2016
Merged
Conversation
sklearn/linear_model/ridge.py
Outdated
Member
There was a problem hiding this comment.
I think that I would call this "constant_column" rather than "dummy_column", no?
Member
|
A few minor comments that I would like addressed :) |
sklearn/linear_model/ridge.py
Outdated
|
|
||
| centered_kernel = True | ||
| if sparse.issparse(X) or not self.fit_intercept: | ||
| centered_kernel = False |
Member
There was a problem hiding this comment.
This could be written:
centered_kernel = not sparse.issparse(X) and self.fit_intercept
Member
|
LGTM as well. @mblondel do you want to have a look? Otherwise we can merge. |
…ble with sparse matrices
Member
Author
|
@ogrisel, addressed your comments and rebased on master. |
Member
|
Thanks for the fix! Feel free to merge without my review. |
Member
|
flake8 is complaining ;) |
Member
Author
|
Fixed. |
Member
|
Merged. I will add a whats new to master directly. |
ogrisel
added a commit
that referenced
this pull request
Oct 5, 2016
amueller
pushed a commit
to amueller/scikit-learn
that referenced
this pull request
Oct 14, 2016
amueller
added a commit
to amueller/scikit-learn
that referenced
this pull request
Oct 14, 2016
# Conflicts: # doc/whats_new.rst
Sundrique
pushed a commit
to Sundrique/scikit-learn
that referenced
this pull request
Jun 14, 2017
Sundrique
pushed a commit
to Sundrique/scikit-learn
that referenced
this pull request
Jun 14, 2017
paulha
pushed a commit
to paulha/scikit-learn
that referenced
this pull request
Aug 19, 2017
paulha
pushed a commit
to paulha/scikit-learn
that referenced
this pull request
Aug 19, 2017
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.
Addresses #1807
The following code solves it correctly as far as I can see. I've tried to deal cleanly with sample weight and sparse matrices, as well as the direct/kernel fomulations.
Comments welcome !