28 Jan 2016 | John Salvatier, Thomas V Wiecki, Christopher Fonnesbeck
This paper introduces PyMC3, a new open-source probabilistic programming framework written in Python. PyMC3 leverages Theano to compute gradients via automatic differentiation and compile probabilistic programs on-the-fly to C for increased speed. Unlike other probabilistic programming languages, PyMC3 allows model specification directly in Python code, providing great flexibility and direct interaction with the model. The paper includes a tutorial on using PyMC3 for Bayesian statistical inference and prediction, covering installation, data creation, model definition, model fitting, and posterior analysis. Two case studies are presented to illustrate more sophisticated models: stochastic volatility and a change-point model for coal mining disasters. PyMC3 supports arbitrary deterministic variables, custom distributions, generalized linear models, and different storage backends. The paper discusses the advantages of probabilistic programming and highlights the features of PyMC3, emphasizing its flexibility, ease of use, and compatibility with other scientific libraries.This paper introduces PyMC3, a new open-source probabilistic programming framework written in Python. PyMC3 leverages Theano to compute gradients via automatic differentiation and compile probabilistic programs on-the-fly to C for increased speed. Unlike other probabilistic programming languages, PyMC3 allows model specification directly in Python code, providing great flexibility and direct interaction with the model. The paper includes a tutorial on using PyMC3 for Bayesian statistical inference and prediction, covering installation, data creation, model definition, model fitting, and posterior analysis. Two case studies are presented to illustrate more sophisticated models: stochastic volatility and a change-point model for coal mining disasters. PyMC3 supports arbitrary deterministic variables, custom distributions, generalized linear models, and different storage backends. The paper discusses the advantages of probabilistic programming and highlights the features of PyMC3, emphasizing its flexibility, ease of use, and compatibility with other scientific libraries.