Make StanFit4Model object accessible from Prophet

This commit is contained in:
Maxim Grishin 2019-09-29 23:14:40 +03:00 committed by Ben Letham
parent c7a150312a
commit 05effe55ac

View file

@ -1116,9 +1116,9 @@ class Prophet(object):
iter=self.mcmc_samples,
)
args.update(kwargs)
stan_fit = model.sampling(**args)
for par in stan_fit.model_pars:
self.params[par] = stan_fit[par]
self.stan_fit = model.sampling(**args)
for par in self.stan_fit.model_pars:
self.params[par] = self.stan_fit[par]
# Shape vector parameters
if par in ['delta', 'beta'] and len(self.params[par].shape) < 2:
self.params[par] = self.params[par].reshape((-1, 1))