One module per chapter of Hastie, Tibshirani and Friedman, The Elements of Statistical Learning (2009), with one function per figure, linked to the lecture notes. The code is written for this course with numpy, scipy, pandas, matplotlib and scikit-learn, and reads the book's own data sets.
python3 ch03_linear_regression.py, list its figures with --list, make one with --fig 3.8, or run every chapter with python3 make_all.py --figures.The book's data sets are downloaded once from its website into a local cache. 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_overview_supervised_learning.py · Notes: Overview of Supervised Learning
Module: ch03_linear_regression.py · Notes: Linear Methods for Regression
Module: ch04_linear_classification.py · Notes: Linear Methods for Classification
Module: ch05_basis_expansions.py · Notes: Basis Expansions and Regularization
Module: ch06_kernel_smoothing.py · Notes: Kernel Smoothing Methods
Module: ch07_model_assessment.py · Notes: Model Assessment and Selection
Module: ch08_model_inference_averaging.py · Notes: Model Inference and Averaging
Module: ch09_additive_models_trees.py · Notes: Additive Models, Trees, and Related Methods
Module: ch10_boosting.py · Notes: Boosting and Additive Trees
Module: ch11_neural_networks.py · Notes: Neural Networks
Module: ch12_svm_flexible_discriminants.py · Notes: Support Vector Machines and Flexible Discriminants
Module: ch13_prototypes_nearest_neighbors.py · Notes: Prototype Methods and Nearest-Neighbors
Module: ch14_unsupervised_learning_a.py ch14_unsupervised_learning_b.py · Notes: Unsupervised Learning
Module: ch15_random_forests.py · Notes: Random Forests
Module: ch16_ensemble_learning.py · Notes: Ensemble Learning
Module: ch17_undirected_graphical_models.py · Notes: Undirected Graphical Models
Module: ch18_high_dimensional_problems.py · Notes: High-Dimensional Problems: p ≫ N