Skip to content
This repository

To learn more about PyMC, please refer to the online user's guide.

PyMC in Scientific Research

PyMC is used for Bayesian modeling in a variety of fields. Here is a partial list of publications that cite PyMC in their work.


Basic examples

  • DisasterModel: A changepoint example, with several variations.

  • StraightLineFit: A two-parameter linear regression.

  • WeibullFit: Fitting the parameters of a Weibull distribution.

  • NormalFit: Fitting the parameters of a normal distribution.

  • VonMisesFit: Fitting the parameters of a Von Mises distribution.

  • GelmanBioassay: From section 3.7 of Bayesian Data Analysis by Gelman et al., 2nd ed.

  • CustomStep: An example of a custom step method.

Intermediate and advanced models

For users familiar with BUGS, here are a few examples that are translated directly from BUGS models; the original code is included in each file as a docstring:

  • Koala Koala sighting model (from Link & Barker 2009)

  • Mt Conditional multinomial mark-recapture model (from Link & Barker 2009)

  • Mt2 Unconditional multinomial mark-recapture model (apparently not possible in BUGS)

  • BayesFactor Simple example of Bayes factor calculation

Gaussian process examples

  • Mean: Creates a mean function.

  • Covariance: Creates a covariance function.

  • Realizations: Draws several realizations.

  • Observations: Observes a mean and covariance, then draws several realizations.

  • BasisCov: Creates a covariance from a basis with normally-distributed coefficients.

  • GPMCMC: Creates a PyMC model containing a Gaussian process, and fits it with MCMC.

  • Non-parametric regression: iPython Notebook of NP regression using GP

Links to external examples

Example-bearing threads on mailing list:

Something went wrong with that request. Please try again.