Lasso, Exactly

Worked numerical examples with live tensors and checked exercises.

Live numerical models

Compute, inspect, and change one small model.

  1. From Ridge to Lasso

    trading smooth L2 curvature for the sharp L1 corner at zero

  2. The L-one Subgradient

    piecewise-constant L1 slope sign(w), the subdifferential at zero, and one descent update

  3. The Soft-Threshold Rule

    three-case derivation, the dead zone [-lam, lam], and clamping at zero without sign flip

  4. Negative Source Keeps Its Sign

    negative correlations shrink upward toward zero while retaining their sign

  5. Exact Sparsity

    exact zero weights vs tiny Ridge weights and counting the active set ||w||_0

  6. One Coordinate Drops Out

    orthogonal decoupling, piecewise paths, and L1 diamond corners

  7. At and Beyond the Threshold

    the infinity-norm threshold max |X^T y| where every weight hits zero

  8. Ridge vs Lasso

    multiplicative damping vs additive shift and when to prefer L2 or L1

  9. What Lasso Is and Is Not

    coordinate descent on correlated columns and the limits of L1 selection