Skip to main content

Probabilistic Programming in Python

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

pymc3-3.0rc1.zip (771.2 kB view details)

Uploaded Source

pymc3-3.0rc1.tar.gz (711.6 kB view details)

Uploaded Source

Built Distributions

pymc3-3.0rc1-py3.5.egg (1.0 MB view details)

Uploaded Egg

pymc3-3.0rc1-py2.py3-none-any.whl (769.6 kB view details)

Uploaded Python 2Python 3

pymc3-3.0rc1-py2.7.egg (1.0 MB view details)

Uploaded Egg

File details

Details for the file pymc3-3.0rc1.zip.

File metadata

  • Download URL: pymc3-3.0rc1.zip
  • Upload date:
  • Size: 771.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymc3-3.0rc1.zip
Algorithm Hash digest
SHA256 d8037d030812b980f491b78af7b0a6798c6f6ee2cd7e7b39f9c0ff7fa3fc613e
MD5 88c55ab8be0f11069c6ab9520eeec619
BLAKE2b-256 0cad8ea828b72180eaa82eeba07801f06e1dae5754aaafde1827fe4d1c92f40a

See more details on using hashes here.

File details

Details for the file pymc3-3.0rc1.tar.gz.

File metadata

  • Download URL: pymc3-3.0rc1.tar.gz
  • Upload date:
  • Size: 711.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymc3-3.0rc1.tar.gz
Algorithm Hash digest
SHA256 146e9b975db3cd5be60cdb28c58028e709593e1091e9959abedc0cc4842b18b6
MD5 90cedc864fa2e06c46eca9c18a67f9c6
BLAKE2b-256 14ffc85b54c48b5162503bbef1f1ad1beb456edc114b09ef74631be50701f97e

See more details on using hashes here.

File details

Details for the file pymc3-3.0rc1-py3.5.egg.

File metadata

  • Download URL: pymc3-3.0rc1-py3.5.egg
  • Upload date:
  • Size: 1.0 MB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymc3-3.0rc1-py3.5.egg
Algorithm Hash digest
SHA256 d0d30920a39181cdd0a740450ee394a8f0558e9a4478e22c83d79163cc4cb6fc
MD5 9c5761094c0254cd17c3280f1d857aca
BLAKE2b-256 b0778a62a6de8df227533f6d34df9a7731e5609b9a128138676a838b950582be

See more details on using hashes here.

File details

Details for the file pymc3-3.0rc1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pymc3-3.0rc1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 870753294b9ed5dcf8e3e615499c68546c936f7540969651df521135913ef6b6
MD5 fe3a51bf93e8291297aa33f0bda5c3fc
BLAKE2b-256 2437e2722dca8159873716d2c2d7190242d26faa2f11eaffb14dff62ade3e3f3

See more details on using hashes here.

File details

Details for the file pymc3-3.0rc1-py2.7.egg.

File metadata

  • Download URL: pymc3-3.0rc1-py2.7.egg
  • Upload date:
  • Size: 1.0 MB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymc3-3.0rc1-py2.7.egg
Algorithm Hash digest
SHA256 f860f522408361df59144f97cbebdee1a365205d3e37c192bda770a1ff39841a
MD5 8e8230c84c2c5375eedd6f1a877359fb
BLAKE2b-256 3d524e9b4cd05fe81d0a0c08f5f5e0a1a117c174c3d6f757308b975fbc194662

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page