Skip to content

[MRG+2]: Fix Ridge GCV with centered data#6178

Merged
ogrisel merged 11 commits intoscikit-learn:masterfrom
bthirion:fix-gcv
Oct 5, 2016
Merged

[MRG+2]: Fix Ridge GCV with centered data#6178
ogrisel merged 11 commits intoscikit-learn:masterfrom
bthirion:fix-gcv

Conversation

@bthirion
Copy link
Copy Markdown
Member

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 !

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that I would call this "constant_column" rather than "dummy_column", no?

@GaelVaroquaux
Copy link
Copy Markdown
Member

A few minor comments that I would like addressed :)


centered_kernel = True
if sparse.issparse(X) or not self.fit_intercept:
centered_kernel = False
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be written:

centered_kernel = not sparse.issparse(X) and self.fit_intercept

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Sep 13, 2016

LGTM as well. @mblondel do you want to have a look? Otherwise we can merge.

@ogrisel ogrisel changed the title MRG: Fix gcv [MRG+2]: Fix Ridge GCV with centered data Sep 13, 2016
@bthirion
Copy link
Copy Markdown
Member Author

@ogrisel, addressed your comments and rebased on master.

@mblondel
Copy link
Copy Markdown
Member

Thanks for the fix! Feel free to merge without my review.

@amueller
Copy link
Copy Markdown
Member

flake8 is complaining ;)

@bthirion
Copy link
Copy Markdown
Member Author

Fixed.

@ogrisel ogrisel merged commit b32897f into scikit-learn:master Oct 5, 2016
@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Oct 5, 2016

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants