Nixtla / statsforecast

Lightning ⚡️ fast forecasting with statistical and econometric models.
https://nixtlaverse.nixtla.io/statsforecast
Apache License 2.0
3.92k stars 276 forks source link

[DOCS] | AutoARIMAProphet throws error #594

Closed hoidinh closed 10 months ago

hoidinh commented 1 year ago

What happened + What you expected to happen

Hello, I try to rerun this colab to reproduce example of AutoAutoARIMAProphet. but running into the Error: 'TypeError: concat() takes 1 positional argument but 2 were given' Link below, https://colab.research.google.com/github/Nixtla/statsforecast/blob/main/nbs/src/adapters.prophet.ipynb#scrollTo=2ddb7056-44fc-4fdb-86d1-322da0be329c

Screenshot 2023-07-26 at 5 57 08 PM

TypeError: concat() takes 1 positional argument but 2 were given

Versions / Dependencies

!pip install git+https://github.com/facebookresearch/esm.git

Reproduction script

df = pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv') df.head()

%%capture m = AutoARIMAProphet(daily_seasonality=False) m.fit(df) future = m.make_future_dataframe(365) forecast = m.predict(future)

Issue Severity

High: It blocks me from completing my task.

kvnkho commented 1 year ago

I tried to replicate but can't using the definition in master.

import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv')
playoffs = pd.DataFrame({
  'holiday': 'playoff',
  'ds': pd.to_datetime(['2008-01-13', '2009-01-03', '2010-01-16',
                        '2010-01-24', '2010-02-07', '2011-01-08',
                        '2013-01-12', '2014-01-12', '2014-01-19',
                        '2014-02-02', '2015-01-11', '2016-01-17',
                        '2016-01-24', '2016-02-07']),
  'lower_window': 0,
  'upper_window': 1,
})
superbowls = pd.DataFrame({
  'holiday': 'superbowl',
  'ds': pd.to_datetime(['2010-02-07', '2014-02-02', '2016-02-07']),
  'lower_window': 0,
  'upper_window': 1,
})
holidays = pd.concat((playoffs, superbowls))

m = AutoARIMAProphet(daily_seasonality=False,
                     holidays=holidays)
m.add_country_holidays(country_name='US')
m.fit(df)
future = m.make_future_dataframe(365)
forecast = m.predict(future)

What is your statsforecast version?

And I think this might get fixed next release. Also, do you have Prophet code that you are migrating over? Are you just testing it out or have a real use case? I think the other models might perform better.

hoidinh commented 1 year ago

my statsforecast version is 1.5.0

!pip install statsforecast==1.5.0

I already use AutoARIMA, AutoETS but want to compare with AutoARIMAProphet.

kvnkho commented 1 year ago

Gotcha yeah I'll take a look at this soon.

arcanaxion commented 1 year ago

The error above happens in Pandas 2.0. Per the warning in Pandas 1.5.3: FutureWarning: In a future version of pandas all arguments of concat except for the argument 'objs' will be keyword-only..

jmoralez commented 10 months ago

This was fixed in #456