One module per chapter of Murphy, Probabilistic Machine Learning: Advanced Topics (2023), with one function per figure, linked to the lecture notes. The code is written for this course with numpy, scipy, pandas, matplotlib, scikit-learn and PyTorch.
python3 ch12_mcmc.py, list its figures with --list, make one with --fig 12.1, or run every chapter with python3 make_all.py --figures.Data come from scikit-learn's bundled data sets, small files in data/, and simulation; slow results are cached locally. Each figure is written to img/chNN/ as PNG, SVG and PDF. Shared helpers are in common.py.
Module: ch01_introduction.py · Notes: Introduction
Module: ch02_probability.py · Notes: Probability
Module: ch03_statistics.py · Notes: Statistics
Module: ch04_graphical_models.py · Notes: Graphical models
Module: ch05_information_theory.py · Notes: Information theory
Module: ch06_optimization.py · Notes: Optimization
Module: ch07_inference_overview.py · Notes: Inference algorithms: an overview
Module: ch08_gaussian_filtering_smoothing.py · Notes: Gaussian filtering and smoothing
Module: ch09_message_passing.py · Notes: Message passing algorithms
Module: ch10_variational_inference.py · Notes: Variational inference
Module: ch11_monte_carlo.py · Notes: Monte Carlo methods
Module: ch12_mcmc.py · Notes: Markov chain Monte Carlo
Module: ch13_sequential_monte_carlo.py · Notes: Sequential Monte Carlo
Module: ch14_predictive_models_overview.py · Notes: Predictive models: an overview
Module: ch15_generalized_linear_models.py · Notes: Generalized linear models
Module: ch16_deep_neural_networks.py · Notes: Deep neural networks
Module: ch17_bayesian_neural_networks.py · Notes: Bayesian neural networks
Module: ch18_gaussian_processes.py · Notes: Gaussian processes
Module: ch19_beyond_iid.py · Notes: Beyond the iid assumption
Module: ch20_generative_models_overview.py · Notes: Generative models: an overview
Module: ch21_variational_autoencoders.py · Notes: Variational autoencoders
Module: ch22_autoregressive_models.py · Notes: Autoregressive models
Module: ch23_normalizing_flows.py · Notes: Normalizing flows
Module: ch24_energy_based_models.py · Notes: Energy-based models
Module: ch25_diffusion_models.py · Notes: Diffusion models
Module: ch26_gans.py · Notes: Generative adversarial networks
Module: ch27_discovery_overview.py · Notes: Discovery methods: an overview
Module: ch28_latent_factor_models.py · Notes: Latent factor models
Module: ch29_state_space_models.py · Notes: State-space models
Module: ch30_graph_learning.py · Notes: Graph learning
Module: ch31_nonparametric_bayes.py · Notes: Nonparametric Bayesian models
Module: ch32_representation_learning.py · Notes: Representation learning
Module: ch33_interpretability.py · Notes: Interpretability
Module: ch34_decision_making.py · Notes: Decision making under uncertainty
Module: ch35_reinforcement_learning.py · Notes: Reinforcement learning
Module: ch36_causality.py · Notes: Causality