Chapter 10: Lasso, Elastic Net, and Selection Stability

Explain sparsity and selection — R applications for Reasoning Through Regression.

Reasoning Through Regression: Inference, Prediction, and Regularization with R
Prof. Dr. Bahadır Yüzbaşı

Begin with soft thresholding and a coordinate-descent check, then study the tuning protocol.

Review first: Chapters 8–9.
Data: An orthogonal example, frozen synthetic data and R datasets::mtcars.

The revised tuning and stability run passed all 28 unit checks, manifest checks and KKT gates. The book tables use those verified results.

Study sequence

  1. Read the chapter’s definitions and predict the output in words.
  2. Run the blocks in order in a fresh R session.
  3. Compare the numerical output with the worked example and explain any discrepancy.
  4. Write what the result supports, and record any help used in your learning record.

Code and execution

Download this chapter’s R script or download the complete companion folder. The folder includes the common runner and dependency notes. Extract it into your Downloads folder, then run:

cd "$HOME/Downloads/reasoning-through-regression"
Rscript --vanilla run_chapter.R 10 smoke results/ch10_attempt01

Use a new result directory for each attempt. The runner saves the executed code, console output, software versions and file checksums. For this chapter, smoke mode runs only blocks 1–2. It does not run the later tuning or resampling workflow.

Before a larger run, read the execution guide. The documented seeds, data roles and transformations belong to the teaching example; change them only when the exercise asks you to investigate that change.

All chapters · File checksums