Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 error in fbprophet
#1
Please, help with the error
My code:

df_train = pd.read_csv('C:\\train.csv', parse_dates=['date'])
df_train.rename(columns={'date': 'ds', 'sales': 'y'}, inplace=True)

df_trainds = df_train.pivot_table('y', index='ds',  aggfunc='sum')

df_trainds.reset_index(level=0, inplace=True)
df_trainds.head()

m = Prophet(daily_seasonality = True)
m.fit(df_trainds)
Error:
Error:
TypeErrorTraceback (most recent call last) <ipython-input-37-df4c0da508bd> in <module>() 16 17 m = Prophet(daily_seasonality = True) ---> 18 m.fit(df_trainds) 19 20 C:\Anaconda\lib\site-packages\fbprophet\forecaster.pyc in fit(self, df, **kwargs) 1001 try: 1002 params = model.optimizing( -> 1003 dat, init=stan_init, iter=1e4, **kwargs) 1004 except RuntimeError: 1005 params = model.optimizing( C:\Anaconda\lib\site-packages\pystan\model.pyc in optimizing(self, data, seed, init, sample_file, algorithm, verbose, as_vector, **kwargs) 509 data = {} 510 seed = pystan.misc._check_seed(seed) --> 511 fit = self.fit_class(data, seed) 512 513 m_pars = fit._get_param_names() stanfit4anon_model_db8febf10f23d7fa27a62fbcfd7f17b2_1845989711.pyx in stanfit4anon_model_db8febf10f23d7fa27a62fbcfd7f17b2_1845989711.StanFit4Model.__init__() TypeError: __init__() takes exactly 1 positional argument (2 given)
buran wrote Oct-13-2019, 03:54 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Quote
#2
The proplem was solved by downgrading version of pystan to 14.0 (I had 19.0, while fbprophet was version 3.0)
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  FBProphet() Timeout in Anaconda sobrio1 0 1,399 Dec-21-2017, 05:15 AM
Last Post: sobrio1

Forum Jump:


Users browsing this thread: 1 Guest(s)