pymc-examples
pymc-examples copied to clipboard
data container
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/pymc3_howto/data_container.ipynb Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't have specific guidance yet. Please refer to this overview of updates
Known changes needed
Changes listed in this section should all be done at some point in order to get this notebook to a "Best Practices" state. However, these are probably not enough! Make sure to thoroughly review the notebook and search for other updates.
General updates
- Use numpy random generator (see link above for more guidance on that)
- Use
try...except
when loading data withpm.get_data
, see point 2 in https://github.com/pymc-devs/pymc3/wiki/PyMC3-Jupyter-Notebook-Style-Guide - Add all relevant libraries to watermark, see point 4 in https://github.com/pymc-devs/pymc3/wiki/PyMC3-Jupyter-Notebook-Style-Guide
ArviZ related
- Fix warnings in
plot_hdi
- Use
return_inferencedata=True
everywhere, as well as inference data everywhere.- See for example https://nbviewer.jupyter.org/github/pymc-devs/pymc-examples/blob/main/examples/case_studies/rugby_analytics.ipynb code cell 25 as the recommended way to get posterior and posterior predictive combined in a single inferencedata.
- Use
plot_posterior
in 2nd to last cell to get the reference value added automatically: https://arviz-devs.github.io/arviz/api/generated/arviz.plot_posterior.html. Note that the hdi interval and point estimate can be hidden to keep the look very similar. I'll look into generating a filled kde too, I think it's possible.
Notes
Exotic dependencies
None
I want to work on this issue