Last active
October 9, 2023 01:49
-
-
Save AustinRochford/bfc20cb3262169b41b730bd9faf74477 to your computer and use it in GitHub Desktop.
MRPyMC3-Multilevel Regression and Poststratification with PyMC3
During cell 34, fitting the model, gives me the following error:
Bad initial energy: inf. The model might be misspecified. NaN occurred in optimization.
Could the dataset or the internals on library pyMC3 change enough to give this? I,m using pymc3 version 3.3 with python version 3.6
was this resolved? I got a similar result.
Looks like new versions of PyMC3 used jittering as a default initializing method. To replicate the notebook exactly as it is you now have to specify which method you want, in this case NUTS using ADVI:
with model: trace = pm.sample(draws=1000, random_seed=SEED, nuts_kwargs=NUTS_KWARGS, init='advi', njobs=3)
Hope this works for you
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
During cell 34, fitting the model, gives me the following error:
Bad initial energy: inf. The model might be misspecified. NaN occurred in optimization.
Could the dataset or the internals on library pyMC3 change enough to give this? I,m using pymc3 version 3.3 with python version 3.6