Full-access lesson
Hyperparameter Tuning & Cross-Validation
Chapter 13 tuned the lasso on the diabetes data and reported that five-fold cross-validation picks λ = 0.244, with a one-standard-error choice of 5.518 that keeps five features. Those numbers came from one way of dealing 342 patients into five folds: patient i went to fold i mod 5. Deal the same patients 20 other ways and the same procedure picks λ anywhere from 0.034 to 0.503. The one-standard-error choice moves between 3.09 and 11.4, and the model it selects keeps between four and seven features.
The complete curriculum
All 12 volumes, companion resources, interviews, and architecture reviews.
Executable engineering practice
Subscriber-only Python, Java, TypeScript, and SQL labs in the isolated runner.