Skip to content
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

DEP Deprecate 'normalize' in ridge models #17772

Merged
merged 58 commits into from
Apr 6, 2021

Conversation

maikia
Copy link
Contributor

@maikia maikia commented Jun 29, 2020

Towards: #3020

It deprecates 'normalize' in _ridge.py:
Ridge
RidgeClassifier
RidgeCV
RidgeClassifierCV

@ogrisel
Copy link
Member

ogrisel commented Mar 12, 2021

I will not merge personally as I've been involved so I'll let a 3rd reviewer click the green button

Maybe @lorentzenchr could have a look? Not that there are still problems with Ridge(normalize=True) and sample_weight but this is investigated separately in #19616.

@lorentzenchr lorentzenchr self-requested a review March 12, 2021 15:52
Copy link
Member

@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

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

I have just some questions. Otherwise this seems solid.

doc/whats_new/v1.0.rst Show resolved Hide resolved
examples/linear_model/plot_huber_vs_ridge.py Show resolved Hide resolved
sklearn/linear_model/_base.py Outdated Show resolved Hide resolved
sklearn/linear_model/_base.py Show resolved Hide resolved
@lorentzenchr
Copy link
Member

There is a merge conflict. Please merge main in order for the merge button to reappear.

lorentzenchr
lorentzenchr previously approved these changes Mar 27, 2021
Copy link
Member

@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

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

LGTM. I added a small commit for a bit more detail of the FutureWarning for the elastic net. I hope, it's correct.
@maikia Thank you for this PR and your whole work on deprecating normalize in linear models.

@lorentzenchr
Copy link
Member

lorentzenchr commented Mar 27, 2021

The test test_enet_ridge_consistency is failing.

@agramfort
Copy link
Member

tried to merge main to see if this helps....

I cannot replicate locally

@lorentzenchr
Copy link
Member

Test test_enet_ridge_consistency is failing due to a FutureWarning from _deprecate_normalize from Ridge.
Maybe filtering the test as is done elsewhere fixes this problem?

# FIXME: 'normalize' to be removed in 1.2
@pytest.mark.filterwarnings("ignore:'normalize' was deprecated")
def test_enet_ridge_consistency

@ogrisel
Copy link
Member

ogrisel commented Apr 6, 2021

I think you need to pass -Werror to pytest to reproduce the warning to error conversion.

Copy link
Member

@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

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

LGTM

@lorentzenchr lorentzenchr changed the title Deprecate 'normalize' in _ridge models DEP Deprecate 'normalize' in ridge models Apr 6, 2021
@lorentzenchr lorentzenchr merged commit 9cfacf1 into scikit-learn:main Apr 6, 2021
@agramfort
Copy link
Member

thx @maikia @lorentzenchr @ogrisel ! we are getting there !!!

thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Apr 19, 2021
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
sebp added a commit to sebp/scikit-survival that referenced this pull request Dec 28, 2021
sebp added a commit to sebp/scikit-survival that referenced this pull request Dec 30, 2021
sebp added a commit to sebp/scikit-survival that referenced this pull request Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants