Awesome Open Source
Awesome Open Source

Statistical Rethinking with PyTorch and Pyro

Status: Codes in this repository have not been updated to the latest Pyro versions. Please check out repository for the updated codes of 2nd edition in NumPyro.

Statistical Rethinking is an excellent book for applied Bayesian data analysis. The accompanying codes for the book are written in R and Stan. They are then ported to Python language using PyMC3. Recently, Pyro emerges as a scalable and flexible Bayesian modeling tool (see its tutorial page), so to attract statisticians to this new library, I decided to make a Pyronic version for the codes in this repository. Inspired by the PyMC3onic version, I keep the codes in this repository as close as possible to the original codes in the book.

To say a bit more about Pyro, it is a universal probabilistic programming language which is built on top of PyTorch, a very popular platform for deep learning. If you are familiar with numpy, the transition from numpy.array to torch.tensor is rather straightforward (as demonstrated in this tutorial).

How to read the notebooks


pip install jupyter pandas pyro-ppl seaborn torch

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
jupyter-notebook (6,027
bayesian-inference (88
bayesian-statistics (35
bayesian-methods (27
bayesian-data-analysis (20

Find Open Source By Browsing 7,000 Topics Across 59 Categories