Course · Python code

Python code that reproduces the figures

One module per chapter of Wasserman, All of Nonparametric Statistics (2006), 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.

How to run it

  1. Install Python 3 with numpy, scipy, pandas, matplotlib and scikit-learn.
  2. Run one chapter with python3 ch05_nonparametric_regression.py, list its figures with --list, make one with --fig 5.1, 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.

Chapter 1. Introduction

Module: ch01_introduction.py · Notes: Introduction

5 figures

Chapter 2. Estimating the cdf and Statistical Functionals

Module: ch02_estimating_cdf_functionals.py · Notes: Estimating the cdf and Statistical Functionals

5 figures

Chapter 3. The Bootstrap and the Jackknife

Module: ch03_bootstrap_jackknife.py · Notes: The Bootstrap and the Jackknife

6 figures

Chapter 4. Smoothing: General Concepts

Module: ch04_smoothing_concepts.py · Notes: Smoothing: General Concepts

8 figures

Chapter 5. Nonparametric Regression

Module: ch05_nonparametric_regression.py · Notes: Nonparametric Regression

31 figures

Chapter 6. Density Estimation

Module: ch06_density_estimation.py · Notes: Density Estimation

14 figures

Chapter 7. Normal Means and Minimax Theory

Module: ch07_normal_means_minimax.py · Notes: Normal Means and Minimax Theory

9 figures

Chapter 8. Nonparametric Inference Using Orthogonal Functions

Module: ch08_orthogonal_functions.py · Notes: Nonparametric Inference Using Orthogonal Functions

12 figures

Chapter 9. Wavelets and Other Adaptive Methods

Module: ch09_wavelets_adaptive_methods.py · Notes: Wavelets and Other Adaptive Methods

17 figures

Chapter 10. Other Topics

Module: ch10_other_topics.py · Notes: Other Topics

12 figures