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

Remove normalize argument when creating sklearn solvers #333

Merged
merged 3 commits into from
Dec 10, 2021

Conversation

santisoler
Copy link
Member

@santisoler santisoler commented Dec 6, 2021

The normalize argument in the sklearn's LinearRegression and Ridge
classes has been deprecated since version 1.0.0.

Reminders:

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst and the base __init__.py file for the package.
  • Write detailed docstrings for all functions/classes/methods. It often helps to design better code if you write the docstrings first.
  • If adding new functionality, add an example to the docstring, gallery, and/or tutorials.
  • Add your full name, affiliation, and ORCID (optional) to the AUTHORS.md file (if you haven't already) in case you'd like to be listed as an author on the Zenodo archive of the next release.

The normalize argument in the sklearn.LinearRegression and sklearn.Ridge
classes has been deprecated since sklearn 1.0.
@leouieda
Copy link
Member

leouieda commented Dec 7, 2021

😢 seems like newer versions of dependencies are breaking on Python 3.6. I think it's time we ditch it to be honest. We could have done so a few years back already.

But I don't think we should require the very latest scikit-learn. See fatiando/community#40

From the docs of scikit-learn v0.22, the default is normalize=False anyway. I'm not sure why I set it explicitly here. So you could unpin scikit-learn and just remove the normalize argument to fix the error.

@santisoler
Copy link
Member Author

Thanks for the comment.

😢 seems like newer versions of dependencies are breaking on Python 3.6. I think it's time we ditch it to be honest. We could have done so a few years back already.

Sound fair. We should do that on a separate PR.

But I don't think we should require the very latest scikit-learn. See fatiando/community#40

From the docs of scikit-learn v0.22, the default is normalize=False anyway. I'm not sure why I set it explicitly here. So you could unpin scikit-learn and just remove the normalize argument to fix the error.

I agree. I took a very conservative choice, but now that you mention it, it's better to not pin scikitlearn.

@leouieda leouieda merged commit f0b2021 into master Dec 10, 2021
@leouieda leouieda deleted the remove-normalize branch December 10, 2021 10:31
@leouieda
Copy link
Member

Thanks!

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.

2 participants