This repository walks through Bayesian Data Analysis by Gelman, Carlin, Stern, Dunson, Vehtari, and Rubin. Original code from the book is written in R, Python using Stan, and Matlab and is available on the book's website.
Bayesian Data Analysis is a great and highly recommended reading on Bayesian Methods. As such, this repository isn't designed to replace the learnings from the book, instead it'll hopefully teach you and give you confidence writing models in Pyro.
Pyro is a universal probabilistic programming language originally open-sourced by Uber AI Labs. Its applications far exceed what Bayesian Data Analysis covers, but yet is simple enough to apply to bayesian analysis and modelling.
Pyro is built on top of PyTorch. More information about Pyro, and the release is available on the Uber Engineering blog.
-
Chapter 2: Single Parameter Models.
This is a great introduction to bayesian models and pyro. In this, we've ported examples estimating the sex ratio in births and estimating rates from a poisson distribution.
-
Chapter 3: Multi Parameter Models.
The book now shifts to multi parameter models. It begins by looking at a simple model estimating the speed of light using a Normal model. The code then explores pre-election polling and using different priors.
Please note, that this is a work in progress. I'll (likely slowly) add chapters over time and update previous ones. Please feel free to raise any issues, contribute fixes and improvements, or even add chapters! :)