Project Information ![]() Featured ![]() ![]() Links | PyMCBayesian estimation, particularly using Markov chain Monte Carlo (MCMC), is an increasingly relevant approach to statistical estimation. However, few statistical software packages implement MCMC samplers, and they are non-trivial to code by hand. PyMC is a python module that implements a suite of MCMC algorithms as python classes, and is extremely flexible and applicable to a large suite of problems. PyMC includes methods for summarizing output, plotting, goodness-of-fit and convergence diagnostics. DownloadSource code and binary packages for the 2.0 release are now available at the Python Package Index. If a binary package is not available for your platform, building PyMC should pose no particular problem, requiring only a C and Fortran compiler. Build instructions can be found in the user guide included in the source distribution. Access to the source code is available at GitHub (the SVN repository on Google Code has been deprecated). We recommend users build PyMC from the development code rather than using the released version, as it contains bug fixes and features not available in the current release, and tends to be pretty stable and reliable. Macintosh (OSX 10.6) users may obtain a current build of PyMC as part of the Scipy Superpack, which includes all dependencies in an easy-to-install script. Previous users of the 1.3 version should note that the syntax used to define statistical models has changed significantly. While it is always difficult to break backward-compatibility, the changes bring drastic improvements in performance and flexibility. ExamplesTo get an idea of what a PyMC2 model looks like, we have provided a few examples:
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:
User-contributed tutorials and recipes can be found in in the wiki. More examples can be found in the examples folder in the source tree. Also, the user guide contains a tutorial section. SupportThe PyMC User’s Guide contains detailed installation instructions, as well as some MCMC theoretical background and a tutorial on using PyMC. The user's guide is available in the downloads section. For help, questions or suggestions on a particular topic related to PyMC, please visit the PyMC Google Group. If you wish to file a bug report or suggest enhancements to PyMC, please submit an issue at our issues page (which replaces our old issues tracker. CitationWhen referencing PyMC in your publication, the appropriate citation is: Patil, A., D. Huard and C.J. Fonnesbeck. 2010. PyMC: Bayesian Stochastic Modelling in Python. Journal of Statistical Software, 35(4), pp. 1-81. |