The fit method do not work with pystan==2.17.0.0
See original GitHub issue---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-16-0235c1cd9218> in <module>()
----> 1 m.fit(serie);
~/.pyenv/versions/3.6.2/envs/manhattan/lib/python3.6/site-packages/fbprophet/forecaster.py in fit(self, df, **kwargs)
832 try:
833 params = model.optimizing(
--> 834 dat, init=stan_init, iter=1e4, **kwargs)
835 except RuntimeError:
836 params = model.optimizing(
~/.pyenv/versions/3.6.2/envs/manhattan/lib/python3.6/site-packages/pystan/model.py in optimizing(self, data, seed, init, sample_file, algorithm, verbose, as_vector, **kwargs)
470 data = {}
471 seed = pystan.misc._check_seed(seed)
--> 472 fit = self.fit_class(data, seed)
473
474 m_pars = fit._get_param_names()
stanfit4anon_model_1fdd477dd8bcc50395c4e25c8741f1c1_7672185744958054027.pyx in stanfit4anon_model_1fdd477dd8bcc50395c4e25c8741f1c1_7672185744958054027.StanFit4Model.__init__()
TypeError: __init__() takes exactly 1 positional argument (2 given)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:8 (3 by maintainers)
Top Results From Across the Web
What's New — PyStan 2.19.1.1 documentation
Fit method to_dataframe organizes draws into a Pandas DataFrame. Only works if Pandas is installed. Thanks to Liam Brannigan and Ari Hartikainen ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I received the same error
TypeError: __init__() takes exactly 1 positional argument (2 given)
andpip install -U fbprophet
didn’t resolve the issue under Python 3.6.3 :: Anaconda, Inc. but introduced aCython
error!I used the following commands to finally get it working,
Received this same error on my system with fbprophet updated from 0.1.1 to 0.2, and python 3.5 while using jupyter. Running
sudo pip3 install -U fbprophet
didn’t resolve the issue for me. I found two possible workarounds though.Or
Haven’t tested this thoroughly but the fit error did go away.