Unable to replicate "Stochastic Volatility model" in PyMC v5.20 #7672
-
I have been trying to run this notebook with the following packages:
Running the function with stochastic_vol_model:
idata = pm.sample_prior_predictive(500, random_seed=rng)
prior_predictive = az.extract(idata, group="prior_predictive") Note that similar to the notebook, I have set the random seed state as Additionally, while trying to run this bit of code with the RandomState: with stochastic_vol_model:
idata.extend(pm.sample(random_seed=rng))
posterior = az.extract(idata)
posterior["exp_volatility"] = np.exp(posterior["volatility"]) I get the error:
While setting the random generator as |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes we should use generator not randomstate. If I remember correctly, the "results" of that notebook are very dependent on the seed, you can try a different value, but they are not very stable. And if they depend on the seed they are not very meaningful either. |
Beta Was this translation helpful? Give feedback.
Yes we should use generator not randomstate.
If I remember correctly, the "results" of that notebook are very dependent on the seed, you can try a different value, but they are not very stable. And if they depend on the seed they are not very meaningful either.