pymc-devs / pymc-devs/pymc-examples
Penalized Complexity Priors: Recipes for PyMC
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 398
- Forks
- 325
- Avg merge
- 9d 15m
- Merged PRs (30d)
- 1
Description
Penalized Complexity Priors: Recipes for PyMC
Why should this notebook be added to pymc-examples?
The penalized complexity framework creates nice, informative "default" priors for common modeling situations. They're used a lot in INLA, and are mentioned in a few places in Stan's prior choice guide. Some are pretty easy to implement and others are more difficult. There are also PC priors derived for situations where setting picking a prior is tricky (negative binomial overdispersion, student T degrees of freedom, GPs). Right now if users want to implement PC priors, it takes a bit of work to go through the literature and adapt them to how distributions are parameterized in PyMC. This notebook would be a reference where users can understand how to set their hyperparameters and quickly implement them more or less via copy/paste (some should probably be done as an actual distribution like Student-T df since it takes more than a few lines to implement). The goal wont be to describe PC priors in depth or to try to convince people to use them.
Hopefully it will cover (checks where I've got something working, see here):
- Gaussian random effects
- Overdispersion, negative binomial
- Student T degrees of freedom
- GPs with Matern covariance functions
- AR models
- P-splines
- BYM (or point to @daniel-saunders-phil's project)
Suggested categories:
- Level: Intermediate
- Diataxis type: Reference
Related Notebooks
Not aware of any
References
- PC priors original paper: https://arxiv.org/abs/1403.4630
- @dpsimpson's posts:
- Matern GPs: https://arxiv.org/abs/1503.00256
- Splines: https://arxiv.org/pdf/1511.05748.pdf
- AR models: https://arxiv.org/pdf/1608.08941.pdf
- BYM
- https://arxiv.org/abs/1902.00242
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 by reviewing the linked gist and the cited PC-prior references, then use the checked and unchecked topic list to define the notebook scope. Done means a PyMC examples notebook covers the proposed prior recipes, explains hyperparameter choices, and addresses the suggested intermediate/reference categorization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100