https://github.com/fehiepsi/rethinking-pyro
Statistical Rethinking with PyTorch and Pyro
https://github.com/fehiepsi/rethinking-pyro
bayesian-data-analysis bayesian-inference bayesian-methods bayesian-statistics
Last synced: 6 months ago
JSON representation
Statistical Rethinking with PyTorch and Pyro
- Host: GitHub
- URL: https://github.com/fehiepsi/rethinking-pyro
- Owner: fehiepsi
- License: mit
- Created: 2018-04-29T07:31:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-27T06:47:52.000Z (almost 6 years ago)
- Last Synced: 2025-03-27T23:33:01.941Z (7 months ago)
- Topics: bayesian-data-analysis, bayesian-inference, bayesian-methods, bayesian-statistics
- Language: Jupyter Notebook
- Homepage: https://fehiepsi.github.io/rethinking-pyro/
- Size: 63.8 MB
- Stars: 163
- Watchers: 4
- Forks: 36
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Statistical Rethinking with PyTorch and Pyro
**Status:** Codes in this repository have not been updated to the latest Pyro versions. Please check out https://github.com/fehiepsi/rethinking-numpyro repository for the updated codes of 2nd edition in NumPyro.
[*Statistical Rethinking*](https://xcelab.net/rm/statistical-rethinking/) is an excellent book for applied [Bayesian data analysis](https://en.wikipedia.org/wiki/Bayesian_statistics). The [accompanying codes for the book](https://github.com/rmcelreath/rethinking) are written in **R** and **Stan**. They are then [ported to Python language](https://github.com/pymc-devs/resources/tree/master/Rethinking) using [PyMC3](https://docs.pymc.io/). Recently, [Pyro](http://pyro.ai/) emerges as a scalable and flexible Bayesian modeling tool (see its [tutorial page](http://pyro.ai/examples/)), 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](https://en.wikipedia.org/wiki/Probabilistic_programming_language) which is built on top of [PyTorch](https://pytorch.org/), a very popular platform for deep learning. If you are familiar with [numpy](http://www.numpy.org/), the transition from `numpy.array` to `torch.tensor` is rather straightforward (as demonstrated in [this tutorial](https://pytorch.org/tutorials/beginner/blitz/tensor_tutorial.html)).
## How to read the notebooks
+ Read on the site: https://fehiepsi.github.io/rethinking-pyro/
+ Use GitHub's renderer: https://github.com/fehiepsi/rethinking-pyro/tree/master/notebooks/
+ Use Jupyter's nbviewer: https://nbviewer.jupyter.org/github/fehiepsi/rethinking-pyro/tree/master/notebooks/
## Installation
```sh
pip install jupyter pandas pyro-ppl seaborn torch
```