35. PyMC: Markov chain Monte Carlo in Python

Audience level:
March 11th 8:45 a.m. – 8:50 a.m.


PyMC implements a suite of Markov chain Monte Carlo (MCMC) sampling algorithms making it extremely flexible, extensible and applicable to a large suite of statistical modeling problems. PyMC's clear, concise syntax allows scientists to flexibly implement Bayesian models without hand-coding samplers.


While the accessibility of Bayesian computation has been expanded greatly by software such as BUGS and its cousins, implementing models with such tools can be tricky to code and difficult to debug. Moreover, one often wants to extend or customize the capabilities of Markov chain Monte Carlo (MCMC) samplers to suit the needs of particular problems, which is difficult in most available software. PyMC implements Bayesian statistical models and fitting algorithms, including MCMC, in Python. It offers object-oriented implementations of many samplers, which allows for maximum flexibility and extensibility and and makes it suitable for a wide range of problems. PyMC includes a large suite of well-dcumented statistical distributions, methods for summarizing output and plotting, and a range of goodness-of-fit and convergence diagnostics. Using Python's clean, concise syntax, users can efficiently code a probabilistic model and draw samples from its posterior distribution using MCMC or related techniques. PyMC models can be embedded in larger programs, and results can be analyzed with the full power of Python.