JoaquinAmatRodrigo / skforecast

Time series forecasting with machine learning models
https://skforecast.org
BSD 3-Clause "New" or "Revised" License
1.09k stars 124 forks source link

grid_search_forecaster_multiseries - error #714

Closed AVPokrovsky closed 1 month ago

AVPokrovsky commented 3 months ago

Hi, I upgraded to the last version and got this error from grid_search_forecaster_multiseries. It worked with previous version with the same data (I don't remember which version was used before)

210 models compared for 1 level(s). Number of iterations: 210. lags grid: 0%| | 0/7 [00:00<?, ?it/s] params grid: 0%| | 0/30 [00:00<?, ?it/s] lags grid: 0%| | 0/7 [00:00<?, ?it/s]TypeError: DataFrame.reset_index() got an unexpected keyword argument 'names'

JavierEscobarOrtiz commented 3 months ago

Hello @AVPokrovsky,

Thanks for contacting us, the problem here is that the argument names in reset_index() was included in pandas 1.5.

Our requirements start with pandas 1.2, we will fix it in skforecast 0.13.

In the meantime, install pandas 1.5 or higher. This should fix the bug.

Hope this helps!

AVPokrovsky commented 3 months ago

It seems this is not a reason. I already have 1.5.1

Name: pandas Version: 1.5.1 Summary: Powerful data structures for data analysis, time series, and statistics Home-page: https://pandas.pydata.org Author: The Pandas Development Team Author-email: pandas-dev@python.org License: BSD-3-Clause Location: c:\anaconda\envs\test7\lib\site-packages Requires: python-dateutil, numpy, pytz Required-by: yfinance, yahoo-fin, trendln, streamlit, statsmodels, spacy-streamlit, skforecast, seaborn, Quandl, pytrends, prophet, pmdarima, pandas-ta, pandas-datareader, cmdstanpy, catboost, altair

JavierEscobarOrtiz commented 3 months ago

This is strange, looking at the pandas documentation, names was introduced in this version:

https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.reset_index.html

imagen

Could you please try with pandas 2.0?

AVPokrovsky commented 3 months ago

Finally I resolved this issue changing pandas version. I got another one with RNN regressor (below). It also appears with you code examples on RNN. It was resolved when I downgraded Tensorflow from 2.16.1 to 2.15.1

Input shape of the regressor should be Input(shape=(lags, n_series))

JavierEscobarOrtiz commented 3 months ago

I open a new issue regarding the RNN regressor @FernandoCarazoMelo

bassamabdelghani commented 2 months ago

Finally I resolved this issue changing pandas version. I got another one with RNN regressor (below). It also appears with you code examples on RNN. It was resolved when I downgraded Tensorflow from 2.16.1 to 2.15.1

Input shape of the regressor should be Input(shape=(lags, n_series))

how you managed to install the older version 2.15.1? when i tried to do that i gett the below error :

ERROR: Could not find a version that satisfies the requirement tensorflow==2.15.1 (from versions: 2.16.0rc0, 2.16.1, 2.16.2, 2.17.0rc0, 2.17.0rc1, 2.17.0) ERROR: No matching distribution found for tensorflow==2.15.1

FernandoCarazoMelo commented 2 months ago

Hi, @bassamabdelghani ,

Which Python version are you using?

bassamabdelghani commented 2 months ago

Hi, @bassamabdelghani ,

Which Python version are you using?

I'm using version 3.12.4