Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyMC3

Gitter

Build Status

PyMC3 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 getting started guide!

PyMC3 is beta software. Users should consider using PyMC 2 repository.

Features

  • Intuitive model specification syntax, for example, x ~ N(0,1) translates to x = Normal(0,1)

  • Powerful sampling algorithms, such as the No U-Turn Sampler, allow complex models with thousands of parameters with little specialized knowledge of fitting algorithms.

  • Variational inference: ADVI for fast approximate posterior estimation as well as mini-batch ADVI for large data sets.

  • Easy optimization for finding the maximum a posteriori (MAP) point

  • Theano features

  • Numpy broadcasting and advanced indexing

  • Linear algebra operators

  • Computation optimization and dynamic C compilation

  • Simple extensibility

  • Transparent support for missing value imputation

Getting started

Installation

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

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

To ensure the development branch of Theano is installed alongside PyMC3 (recommended), you can install PyMC3 using the requirements.txt file. This requires cloning the repository to your computer:

git clone https://github.com/pymc-devs/pymc3
cd pymc3
pip install -r requirements.txt

However, if a recent version of Theano has already been installed on your system, you can install PyMC3 directly from GitHub.

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

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

Dependencies

PyMC3 is tested on Python 2.7 and 3.3 and depends on Theano, NumPy, SciPy, Pandas, and Matplotlib (see requirements.txt for version information).

Optional

In addtion to the above dependencies, the GLM submodule relies on Patsy[http://patsy.readthedocs.io/en/latest/].

`scikits.sparse <https://github.com/njsmith/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

Citing PyMC3

Salvatier J, Wiecki TV, Fonnesbeck C. (2016) Probabilistic programming in Python using PyMC3. PeerJ Computer Science 2:e55 https://doi.org/10.7717/peerj-cs.55

Coyle P. (2016) Probabilistic programming and PyMC3. European Scientific Python Conference 2015 (Cambridge, UK) http://adsabs.harvard.edu/abs/2016arXiv160700379C

License

Apache License, Version 2.0

Contributors

See the GitHub contributor page

Release files for pymc3 3.0.rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for pymc3 3.0.rc1
File Size Uploaded
pymc3-3.0rc1.zip 771.2 kB Details
pymc3-3.0rc1.tar.gz 711.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pymc3 3.0.rc1
File Interpreter ABI Platform
pymc3-3.0rc1-py3.5.egg Legacy Egg format - - Details
pymc3-3.0rc1-py2.py3-none-any.whl Python 2, Python 3 none any Details
pymc3-3.0rc1-py2.7.egg Legacy Egg format - - Details

Total release size: 4.3 MB

Release files / pymc3-3.0rc1.zip

Download URL pymc3-3.0rc1.zip
Size 771.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d8037d030812b980f491b78af7b0a6798c6f6ee2cd7e7b39f9c0ff7fa3fc613e
BLAKE2b-256 checksum
How to use checksums
0cad8ea828b72180eaa82eeba07801f06e1dae5754aaafde1827fe4d1c92f40a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymc3-3.0rc1.tar.gz

Download URL pymc3-3.0rc1.tar.gz
Size 711.6 kB
Tags Source
SHA-256 checksum
How to use checksums
146e9b975db3cd5be60cdb28c58028e709593e1091e9959abedc0cc4842b18b6
BLAKE2b-256 checksum
How to use checksums
14ffc85b54c48b5162503bbef1f1ad1beb456edc114b09ef74631be50701f97e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymc3-3.0rc1-py3.5.egg

Download URL pymc3-3.0rc1-py3.5.egg
Size 1.0 MB
Tags Egg
SHA-256 checksum
How to use checksums
d0d30920a39181cdd0a740450ee394a8f0558e9a4478e22c83d79163cc4cb6fc
BLAKE2b-256 checksum
How to use checksums
b0778a62a6de8df227533f6d34df9a7731e5609b9a128138676a838b950582be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymc3-3.0rc1-py2.py3-none-any.whl

Download URL pymc3-3.0rc1-py2.py3-none-any.whl
Size 769.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
870753294b9ed5dcf8e3e615499c68546c936f7540969651df521135913ef6b6
BLAKE2b-256 checksum
How to use checksums
2437e2722dca8159873716d2c2d7190242d26faa2f11eaffb14dff62ade3e3f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymc3-3.0rc1-py2.7.egg

Download URL pymc3-3.0rc1-py2.7.egg
Size 1.0 MB
Tags Egg
SHA-256 checksum
How to use checksums
f860f522408361df59144f97cbebdee1a365205d3e37c192bda770a1ff39841a
BLAKE2b-256 checksum
How to use checksums
3d524e9b4cd05fe81d0a0c08f5f5e0a1a117c174c3d6f757308b975fbc194662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page