Choosing a line: two numbers, one error

IS 507 Lecture 10 · 331 training patients, diabetes data
ŷ = + × BMI
Training MSE: Training RMSE: Best possible RMSE:

Left: each red segment is one patient's miss, y − ŷ. Training MSE is the average of the squared misses; RMSE is its square root. Right: the training RMSE for every choice of (β0, β1); darker is smaller. Click anywhere on it to pick that line. The best line sits at the bottom of a long, narrow valley.

Data: Efron, Hastie, Johnstone, and Tibshirani (2004), "Least Angle Regression," Annals of Statistics 32(2); the unscaled copy in scikit-learn, load_diabetes(scaled=False). The 331 training patients of the Lecture 9 split (train_test_split(test_size=0.25, random_state=507)). The data block below is written by lecture-10-notebook-2026-10-08-v1.ipynb.