mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-18 08:53:42 +00:00
Make StanFit4Model object accessible from Prophet
This commit is contained in:
parent
c7a150312a
commit
05effe55ac
1 changed files with 3 additions and 3 deletions
|
|
@ -1116,9 +1116,9 @@ class Prophet(object):
|
||||||
iter=self.mcmc_samples,
|
iter=self.mcmc_samples,
|
||||||
)
|
)
|
||||||
args.update(kwargs)
|
args.update(kwargs)
|
||||||
stan_fit = model.sampling(**args)
|
self.stan_fit = model.sampling(**args)
|
||||||
for par in stan_fit.model_pars:
|
for par in self.stan_fit.model_pars:
|
||||||
self.params[par] = stan_fit[par]
|
self.params[par] = self.stan_fit[par]
|
||||||
# Shape vector parameters
|
# Shape vector parameters
|
||||||
if par in ['delta', 'beta'] and len(self.params[par].shape) < 2:
|
if par in ['delta', 'beta'] and len(self.params[par].shape) < 2:
|
||||||
self.params[par] = self.params[par].reshape((-1, 1))
|
self.params[par] = self.params[par].reshape((-1, 1))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue