pymc-devs / pymc-devs/pymc-examples

Penalized Complexity Priors: Recipes for PyMC

Open
#558 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

proposal
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.