timeseriesAI / tsai

Time series Timeseries Deep Learning Machine Learning Python Pytorch fastai | State-of-the-art Deep Learning library for Time Series and Sequences in Pytorch / fastai
https://timeseriesai.github.io/tsai/
Apache License 2.0
5.07k stars 633 forks source link

MiniRocket incompatible with latest scikit-learn version #677

Closed isears closed 1 year ago

isears commented 1 year ago

FYI when I installed tsai into an environment with scikit-learn v1.2.1 and tried to use MINIROCKET, I got the following error:

Traceback (most recent call last):
  File "xxx", line 11, in <module>
    model = MiniRocketRegressor()
  File "xxx/python3.10/site-packages/tsai/models/MINIROCKET.py", line 87, in __init__
    ('ridgecv', RidgeCV(alphas=alphas, normalize=normalize_features, scoring=scoring, **kwargs))]
TypeError: _BaseRidgeCV.__init__() got an unexpected keyword argument 'normalize'

It looks like the normalize keyword in RidgeCV was removed in scikit-learn v1.2.1

If anyone else is having this problem, downgrading sklearn to v1.1.3 appears to fix the issue for now. That is assuming nothing else in your environment depends on the latest version.

pip install scikit-learn==1.1.3
oguiza commented 1 year ago

Hi @isears, Thanks for raising this issue. I'll work on it as soon as I can.