Skip to content

Instantly share code, notes, and snippets.

@AustinRochford
Last active October 9, 2023 01:49
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save AustinRochford/bfc20cb3262169b41b730bd9faf74477 to your computer and use it in GitHub Desktop.
Save AustinRochford/bfc20cb3262169b41b730bd9faf74477 to your computer and use it in GitHub Desktop.
MRPyMC3-Multilevel Regression and Poststratification with PyMC3
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jaircastruita
Copy link

jaircastruita commented Dec 7, 2018

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