PyMC3 is a powerful relatively new library for probabilistic models. The developers have given multiple talks describing probabilistic models, Bayesian statistics, and the features of the library. This tutorial aims to complement these talks by providing a practical guide to using PyMC3 with step-by-step implementations of some basic models and some issues you might encounter.
This tutorial will walk through some basic models to show you how easy it can be to use PyMC3. The models will be written so that it should be easy to extend them to real datasets.
I’ll start with basic linear regression and logistic regression. I will then demonstrate using PyMC3 on hierarchical models.
Along the way, I’ll touch on the different samplers as well as a variational inference algorithm called ADVI that has recently been added to the library.
I will also share some of the bugs I ran into and the solutions I found.