PyMC (formerly known as PyMC3) is a
probabilistic programming language written in
Python. It can be used for Bayesian statistical modeling and probabilistic machine learning.
PyMC performs inference based on advanced Markov chain Monte Carlo and/or variational fitting algorithms.[2][3][4][5][6]
It is a rewrite from scratch of the previous version of the PyMC software.[7]
Unlike PyMC2, which had used
Fortran extensions for performing computations, PyMC relies on PyTensor, a Python library that allows defining, optimizing, and efficiently evaluating mathematical expressions involving multi-dimensional arrays.
From version 3.8 PyMC relies on
ArviZ to handle plotting, diagnostics, and statistical checks. PyMC and
Stan are the two most popular
probabilistic programming tools.[8]
PyMC is an
open source project, developed by the community and has been fiscally sponsored by
NumFOCUS.[9]
After
Theano announced plans to discontinue development in 2017,[26] the PyMC team evaluated
TensorFlow Probability as a computational backend,[27] but decided in 2020 to
fork Theano under the name Aesara.[28]
Large parts of the Theano codebase have been refactored and compilation through
JAX[29] and
Numba were added.
The PyMC team has released the revised computational backend under the name PyTensor and continues the development of PyMC.[30]
Inference engines
PyMC implements non-gradient-based and gradient-based
Markov chain Monte Carlo (MCMC) algorithms for Bayesian inference and stochastic, gradient-based
variational Bayesian methods for approximate Bayesian inference.
MCMC-based algorithms:
No-U-Turn sampler[31] (NUTS), a variant of
Hamiltonian Monte Carlo and PyMC's default engine for continuous variables
PyMC (formerly known as PyMC3) is a
probabilistic programming language written in
Python. It can be used for Bayesian statistical modeling and probabilistic machine learning.
PyMC performs inference based on advanced Markov chain Monte Carlo and/or variational fitting algorithms.[2][3][4][5][6]
It is a rewrite from scratch of the previous version of the PyMC software.[7]
Unlike PyMC2, which had used
Fortran extensions for performing computations, PyMC relies on PyTensor, a Python library that allows defining, optimizing, and efficiently evaluating mathematical expressions involving multi-dimensional arrays.
From version 3.8 PyMC relies on
ArviZ to handle plotting, diagnostics, and statistical checks. PyMC and
Stan are the two most popular
probabilistic programming tools.[8]
PyMC is an
open source project, developed by the community and has been fiscally sponsored by
NumFOCUS.[9]
After
Theano announced plans to discontinue development in 2017,[26] the PyMC team evaluated
TensorFlow Probability as a computational backend,[27] but decided in 2020 to
fork Theano under the name Aesara.[28]
Large parts of the Theano codebase have been refactored and compilation through
JAX[29] and
Numba were added.
The PyMC team has released the revised computational backend under the name PyTensor and continues the development of PyMC.[30]
Inference engines
PyMC implements non-gradient-based and gradient-based
Markov chain Monte Carlo (MCMC) algorithms for Bayesian inference and stochastic, gradient-based
variational Bayesian methods for approximate Bayesian inference.
MCMC-based algorithms:
No-U-Turn sampler[31] (NUTS), a variant of
Hamiltonian Monte Carlo and PyMC's default engine for continuous variables