Skip to content
This repository

PyMC version 3 (PyMC 2 is in branch 2.3)

readme.md

PyMC 3

Build Status

PyMC is a python module for Bayesian statistical modeling and model fitting which focuses on advanced Markov chain Monte Carlo fitting algorithms. Its flexibility and extensibility make it applicable to a large suite of problems.

Check out the Tutorial!

PyMC 3 is alpha software and is not ready for use in production. We encourage most new users to use the current release version in the PyMC 2.3 branch. Release versions are also available on PyPI and Binstar.

Features

  • Intuitive model specification syntax, for example, x ~ N(0,1) translates to x = Normal(0,1)
  • Powerful sampling algorithms such as Hamiltonian Monte Carlo
  • Easy optimization for finding the maximum a posteriori point
  • Theano features
    • Numpy broadcasting and advanced indexing
    • Linear algebra operators
    • Computation optimization and dynamic C compilation
  • Simple extensibility

Getting started

Installation

The latest version of PyMC 3 can be installed from the master branch using pip:

pip install git+https://github.com/pymc-devs/pymc

Another option is to clone the repository and install PyMC using python setup.py install or python setup.py develop.

Note: Running pip install pymc will install PyMC 2.3, not PyMC 3, from PyPI.

Dependencies

PyMC is tested on Python 2.7 and 3.3 and depends on Theano, NumPy, SciPy, and Matplotlib (see setup.py for version information).

Optional

The GLM submodule relies on Pandas, Patsy, Statsmodels.

scikits.sparse enables sparse scaling matrices which are useful for large problems. Installation on Ubuntu is easy:

sudo apt-get install libsuitesparse-dev
pip install git+https://github.com/njsmith/scikits-sparse.git

On Mac OS X you can install libsuitesparse 4.2.1 via homebrew (see http://brew.sh/ to install homebrew), manually add a link so the include files are where scikits-sparse expects them, and then install scikits-sparse:

brew install suite-sparse
ln -s /usr/local/Cellar/suite-sparse/4.2.1/include/ /usr/local/include/suitesparse
pip install git+https://github.com/njsmith/scikits-sparse.git

License

Apache License, Version 2.0

Something went wrong with that request. Please try again.