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

[BUG] dealing with sklearn 1.2 deprecation warnings #2143

Closed
2 tasks done
fkiraly opened this issue Feb 26, 2022 · 9 comments
Closed
2 tasks done

[BUG] dealing with sklearn 1.2 deprecation warnings #2143

fkiraly opened this issue Feb 26, 2022 · 9 comments
Labels
bug Something isn't working good first issue Good for newcomers maintenance Continuous integration, unit testing & package distribution

Comments

@fkiraly
Copy link
Collaborator

fkiraly commented Feb 26, 2022

A number of sklearn calls raise deprecation warnings and will turn into bugs when sklearn releases version 1.2.
These should be fixed.

  • replacing float variable names by str in pandas.DataFrame passed:
classification/feature_based/_summary_classifier.py: 2 warnings
classification/feature_based/tests/test_summary_classifier.py: 2 warnings
classification/tests/test_all_classifiers.py: 6 warnings
tests/test_all_estimators.py: 23 warnings
  C:\Miniconda\envs\test\lib\site-packages\sklearn\utils\validation.py:1692: FutureWarning: Feature names only support names that are all strings. Got feature names with dtypes: ['float', 'str']. An error will be raised in 1.2.
  • replacing normalize by use of StandardScaler:
transformations/panel/rocket/tests/test_MiniRocket.py::test_minirocket_on_gunpoint
transformations/panel/rocket/tests/test_MiniRocketMultivariate.py::test_minirocket_multivariate_on_basic_motions
transformations/panel/rocket/tests/test_MultiRocket.py::test_multirocket_on_gunpoint
transformations/panel/rocket/tests/test_MultiRocketMultivariate.py::test_multirocket_multivariate_on_basic_motions
transformations/panel/rocket/tests/test_Rocket.py::test_rocket_on_gunpoint
  C:\Miniconda\envs\test\lib\site-packages\sklearn\linear_model\_base.py:145: FutureWarning: 'normalize' was deprecated in version 1.0 and will be removed in 1.2.
  If you wish to scale the data, use Pipeline with a StandardScaler in a preprocessing stage. To reproduce the previous behavior:
  
  from sklearn.pipeline import make_pipeline
  
  model = make_pipeline(StandardScaler(with_mean=False), _RidgeGCV())
@fkiraly fkiraly added bug Something isn't working good first issue Good for newcomers maintenance Continuous integration, unit testing & package distribution labels Feb 26, 2022
@KishenSharma6
Copy link
Contributor

Hi @fkiraly , I'd like to work on this bug.

@fkiraly
Copy link
Collaborator Author

fkiraly commented Mar 3, 2022

alright, @KishenSharma6, thanks! Pick one of the two to start with, I suggest.

@KishenSharma6
Copy link
Contributor

Thanks @fkiraly , the pr #2167 is for replacing normalize by use of StandardScaler.

Please let me know if that pr needs anything additional, I will begin on replacing float variable names by str in pandas.DataFrame passed:

fkiraly pushed a commit that referenced this issue Mar 7, 2022
Normalize' will be removed in the version 1.2 release
of sklearn. Adding Pipeline with a StandardScaler as
a preprocessing stage.

Fixes half of [#2143](#2143)
hmtbgc added a commit to hmtbgc/sktime that referenced this issue Mar 10, 2022
@hmtbgc
Copy link
Contributor

hmtbgc commented Mar 10, 2022

@KishenSharma6 I am sorry that I have PR the first part. You have done a good job. Thanks for your contribution!

@KishenSharma6
Copy link
Contributor

@hmtbgc no worries, thank you so much! I'm having issues building sktime from source so your assistance was much needed and greatly appreciated :)

@jaivanti
Copy link

Hi! I would like to work on this?

@jaivanti
Copy link

If possible can you please brief more about the the 1st part....Like as a beginner just want to clarify more on it. Thanks

@KishenSharma6
Copy link
Contributor

@fkiraly We can mark this one as completed. PR #2167 and #2190 for reference

@jaivanti sorry for the late reply, we were able to complete this one. Feel free to work on another issue. You can reference #2190 to see how @hmtbgc solved the issue (namely changing input data types).

@fkiraly
Copy link
Collaborator Author

fkiraly commented Mar 13, 2022

Yes, indeed, @KishenSharma6, this is done. Forgot to update and close after #2190, thanks for pointing this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers maintenance Continuous integration, unit testing & package distribution
Development

No branches or pull requests

4 participants