Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "'StanModel' object has no attribute 'fit_class' error while using prophet model #10

Closed
bhatiaaman opened this issue Feb 6, 2018 · 3 comments

Comments

@bhatiaaman
Copy link

I am trying to use prophet mode on TechM stock
model , model_data = techM.create_prophet_model()

I am getting error
"

AttributeError Traceback (most recent call last)
in ()
----> 1 model , model_data = techM.create_prophet_model()

~/AmanCode/Python/Stocker/stocker.py in create_prophet_model(self, days, resample)
447 stock_history = self.resample(stock_history)
448
--> 449 model.fit(stock_history)
450
451 # Make and predict for next year with future dataframe

~/anaconda3/lib/python3.6/site-packages/fbprophet/forecaster.py in fit(self, df, **kwargs)
834 try:
835 params = model.optimizing(
--> 836 dat, init=stan_init, iter=1e4, **kwargs)
837 except RuntimeError:
838 params = model.optimizing(

~/anaconda3/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()

AttributeError: 'StanModel' object has no attribute 'fit_class'"

I tried updating numpy as well as pystan , but still getting the same error ..

@WillKoehrsen
Copy link
Owner

That is a problem with either Prophet, numpy, or pystan. Did you try reinstalling with conda?

This thread might be helpful.

@bhatiaaman
Copy link
Author

bhatiaaman commented Feb 7, 2018 via email

@WillKoehrsen
Copy link
Owner

Good to hear. Prophet is relatively new and there are still issues with installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants