Follow along with Kevin Murphy's probabilistic machine learning textbooks using runnable code examples in Colab
Reproduce academic figures and experiments from probabilistic ML research with working Python notebooks
Learn Bayesian inference and uncertainty quantification with concrete JAX or scikit-learn implementations
Run probabilistic ML experiments on free Google Colab GPUs without setting up a local environment
Best run in Google Colab where most libraries are pre-installed, some advanced notebooks require JAX with GPU access for reasonable speed.
pyprobml is a collection of Python notebooks that reproduce the figures and code examples from two textbooks by Kevin Murphy: "Probabilistic Machine Learning: An Introduction" and "Probabilistic Machine Learning: Advanced Topics." The notebooks are organized by book and chapter so readers can follow along with the textbook and run the examples themselves. Probabilistic machine learning is a branch of the field that treats predictions as probability distributions rather than single fixed answers. This lets models express uncertainty, which is useful in areas like medical diagnosis or scientific research where knowing how confident a prediction is matters as much as the prediction itself. The books cover a wide range of topics in this area, and the code in this repository shows working implementations of the methods they describe. Most of the code uses standard Python scientific computing libraries such as NumPy, SciPy, Matplotlib, and scikit-learn. Some notebooks, especially those from the advanced topics book, also use JAX, which is a Google library for numerical computing on GPUs and TPUs. A few notebooks from the introduction book use TensorFlow and PyTorch. The simplest way to run the notebooks is through Google Colab, a free browser-based environment that has most of the required libraries already installed and provides access to GPUs. The README explains how to open any notebook in Colab by modifying its GitHub URL. For those who want to run the code locally, a requirements file is provided for installing the necessary packages. As of September 2022, the repository is in maintenance mode, meaning active development has stopped. The notebooks are still available and runnable, and contributors are still accepted via the contribution guide.
← probml on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.