talira

Bayesian modeling and probabilistic programming in Python

open sourceApache-2.0free

PyMC is a probabilistic programming library for Python: you write Bayesian models in plain Python and fit them with Markov chain Monte Carlo (the NUTS sampler) or variational inference (ADVI). It uses PyTensor as its computational backend, compiling through Numba by default or JAX or C, can run models on the GPU, and includes probability distributions, Gaussian processes, ABC and SMC. It works with ArviZ for diagnostics and plots and with Bambi for mixed-effects models, and it is a non-profit project under the NumFOCUS umbrella.

Problems it solves

  • fit a Bayesian model in Python
  • estimate uncertainty in my model parameters, not just point estimates
  • run MCMC sampling on a custom statistical model

Features

  • Bayesian models written in Python
  • NUTS sampling and ADVI variational inference
  • PyTensor backend compiling through Numba, JAX or C, with GPU support
  • Gaussian processes, ABC and SMC
  • works with ArviZ and Bambi

Alternatives

The same job

These do what PyMC does.

  1. Stan Probabilistic programming language for Bayesian statistical modelling
  2. CmdStan Command-line interface to Stan for compiling and running Bayesian models
  3. CmdStanPy Lightweight Python interface to CmdStan
  4. PyStan Python interface to Stan for Bayesian inference
  5. statsmodels Statistical modeling, hypothesis tests and econometrics in Python

Compare PyMC with the top 3