When I give talks about probabilistic programming and Bayesian statistics, I usually gloss over the details of how inference is actually performed, treating it as a black box essentially. The beauty of probabilistic programming is that you actually don't *have* to understand how the inference works in order to build …

# The Best Of Both Worlds: Hierarchical Linear Regression in PyMC3

# The best of both worlds: Hierarchical Linear Regression in PyMC3¶

(c) Thomas Wiecki & Danne Elbers 2020

The power of Bayesian modelling really clicked for me when I was first introduced to hierarchical modelling. In this blog post we will highlight the advantage of using hierarchical Bayesian modelling as opposed to …

# Animating MCMC with PyMC3 and Matplotlib

Here's the deal: I used PyMC3, matplotlib, and Jake Vanderplas' JSAnimation to create javascript animations of three MCMC sampling algorithms -- Metropolis-Hastings, slice sampling and NUTS.

I like visualizations because they provide a good intuition for how the samplers work and what problems they can run into.

You can download the …

# Hammer time: Nailing the emcee ensemble sampler onto PyMC

tl;dr: I hacked the `emcee`

--The MCMC-Hammer ensemble sampler to work on `PyMC`

models.

## Motivation¶

`PyMC`

is an awesome Python module to perform Bayesian inference. It allows for flexible model creation and has basic MCMC samplers like Metropolis-Hastings. The upcoming PyMC3 will feature much fancier samplers like Hamiltonian-Monte Carlo …

# This world is far from Normal(ly distributed): Bayesian Robust Regression in PyMC3

Author: Thomas Wiecki

This tutorial first appeard as a post in small series on Bayesian GLMs on my blog:

# The Inference Button: Bayesian GLMs made easy with PyMC3

Author: Thomas Wiecki

This tutorial appeared as a post in a small series on Bayesian GLMs on my blog: