The ten blue points are the book's own training set (its targets are recovered from the M = 9 column of Table 1.1, see the notes). Fit a polynomial of order M by minimising the sum-of-squares error (1.2), or the regularised error (1.4) with a penalty (λ/2)‖w‖2. Watch the curve, the coefficients, and the root-mean-square error (1.3) on the training set and on a test set of 100 fresh points: a flexible model with no penalty fits the noise.
code/ch01_deep_learning_revolution.py (functions fit, lsq_qr, rms, eff_params; Figures 1.4 to 1.10).