pymc-devs / pymc-devs/pymc-examples
data container
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 398
- Forks
- 325
- Avg merge
- 9d 15m
- Merged PRs (30d)
- 1
Description
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...exceptwhen 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=Trueeverywhere, 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_posteriorin 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/pymc3_howto/data_container.ipynb and the linked notebook-updates overview and style guide. Review the general NumPy and pm.get_data updates, watermark dependencies, and ArviZ changes, comparing the recommended inference-data pattern in the rugby analytics notebook. Done means the listed updates are applied and the notebook no longer emits the noted plot_hdi warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100