Python notebooks that redraw the figures in Murphy’s ML books
It turns Kevin Murphy’s two-volume probabilistic ML textbook into executable, tweakable Python notebooks.

What it does
This repository holds Python 3 notebooks that reproduce the figures in Kevin Murphy’s Probabilistic Machine Learning: An Introduction and Probabilistic Machine Learning: Advanced Topics. It relies on the standard scientific Python stack—numpy, scipy, matplotlib, sklearn—while pulling in JAX for the advanced material and occasionally TensorFlow 2 or PyTorch when the figure demands it. Shared utilities live in a separate probml-utils package to keep the notebooks focused on the math.
The interesting bit
Textbook companion code usually marries one framework and calls it a day. This repo treats JAX, TensorFlow, and PyTorch as situational tools, picking whichever fits the pedagogical point—a refreshing bit of pragmatism in a field prone to tribal loyalty.
Key highlights
- Covers two full volumes, from introductory Bayes to advanced topics, with notebooks sorted by chapter.
- Designed to run in Colab with free GPU/TPU access, or locally if you bring your own hardware.
- Publishes live dashboards tracking the reproducibility status of figures in both books.
- Entered maintenance mode in September 2022, so the collection is complete but largely frozen.
- Includes Google Summer of Code contributions from 2021 and 2022.
Caveats
- The codebase is in maintenance mode as of September 2022, so expect fixes but not new chapters.
- The README warns that the Git history is “very large”; a shallow clone is effectively mandatory.
- This is companion code, not a standalone library—expect figure scripts, not importable abstractions.
Verdict
If you are working through Murphy’s books and want to tweak priors or re-render plots, this is essential. If you need a general-purpose probabilistic programming toolkit, look elsewhere.
Frequently asked
- What is probml/pyprobml?
- It turns Kevin Murphy’s two-volume probabilistic ML textbook into executable, tweakable Python notebooks.
- Is pyprobml open source?
- Yes — probml/pyprobml is open source, released under the MIT license.
- What language is pyprobml written in?
- probml/pyprobml is primarily written in Jupyter Notebook.
- How popular is pyprobml?
- probml/pyprobml has 7.1k stars on GitHub.
- Where can I find pyprobml?
- probml/pyprobml is on GitHub at https://github.com/probml/pyprobml.