Intuition What this page is
The parent note gave you the master formula for one weight update:
w j = 1 + λ ( 1 − α ) S ( ρ j , λ α ) , S ( z , γ ) = sign ( z ) max ( ∣ z ∣ − γ , 0 ) .
Here we throw every possible kind of input at that formula until nothing can surprise you. We name each case, put it in a grid, then work an example for each cell — signs, zeros, the two extreme α values, correlated groups, and a real-world word problem.
Before we start, let us make sure every symbol is earned.
Definition The three players (read once, refer forever)
ρ j = the correlation of feature j with the partial residual . Concretely ρ j = n 1 ∑ i x ij r i , where r i is "the leftover target after every other feature has done its job." Picture it as a number line: ρ j is a point telling us "how much does feature j still want to explain?" Big positive ρ j = feature pushes the prediction up ; big negative = pushes down ; near zero = feature is useless right now.
λ α = the L1 threshold γ . On that same number line it is a dead zone of half-width γ around 0 . Anything inside the dead zone gets set to exactly 0 .
1 + λ ( 1 − α ) = the L2 divisor . After surviving the dead zone, the value is squished toward 0 by dividing.
Look at the figure: the input ρ j comes in on the horizontal axis, the output w j leaves on the vertical. The flat red segment in the middle is the L1 dead zone; the slope of the sloped part (less than 1 ) is the L2 squish. Every example below is just "where does my ρ j land on this graph?"
Every input to the update belongs to one of these cells. Our job is to hit them all.
Cell
What varies
Example
A. Positive, survives
ρ j > 0 , ∣ ρ j ∣ > λ α
Ex 1
B. Negative, survives
ρ j < 0 , ∣ ρ j ∣ > λ α (sign flows through)
Ex 2
C. Killed (inside dead zone)
∣ ρ j ∣ ≤ λ α → exactly 0
Ex 3
D. Boundary / degenerate
∣ ρ j ∣ = λ α exactly, or ρ j = 0
Ex 4
E. α = 1 limit (pure Lasso)
divisor = 1 , only threshold acts
Ex 5
F. α = 0 limit (pure Ridge)
no dead zone, only divisor acts
Ex 6
G. Correlated group (grouping effect)
two equal features share weight
Ex 7
H. Real-world word problem
build ρ j , apply update, interpret
Ex 8
I. Exam twist (λ → ∞ )
limiting behaviour of both knobs
Ex 9
ρ j = 0.9 , λ = 1 , α = 0.5
Forecast: guess the sign of w j and whether it is bigger or smaller than 0.9 . Write it down.
Threshold γ = λ α = 1 ⋅ 0.5 = 0.5 . Why this step? The dead-zone half-width is exactly λ α ; nothing else determines survival.
Numerator S ( 0.9 , 0.5 ) = sign ( 0.9 ) max ( 0.9 − 0.5 , 0 ) = 0.4 . Why this step? ∣ 0.9 ∣ = 0.9 > 0.5 so it survives; we subtract the threshold (the L1 shrink).
Divisor 1 + λ ( 1 − α ) = 1 + 1 ⋅ 0.5 = 1.5 . Why this step? The L2 penalty always divides survivors by this factor.
Result w j = 0.4/1.5 = 0.2 6 . Why this step? Combine L1 subtraction then L2 division.
Verify: 0 < 0.267 < 0.9 ✓ — both penalties only ever shrink , never grow, never flip sign of a survivor. Sign of w j matches sign of ρ j . ✓
ρ j = − 1.2 , λ = 2 , α = 0.25
Forecast: will w j be negative? By how much roughly?
Threshold γ = λ α = 2 ⋅ 0.25 = 0.5 . Why this step? Same dead-zone rule.
Numerator S ( − 1.2 , 0.5 ) = sign ( − 1.2 ) max ( 1.2 − 0.5 , 0 ) = − 1 ⋅ 0.7 = − 0.7 . Why this step? Soft-thresholding pulls ρ j toward zero by γ but keeps its sign — for negatives that means adding 0.5 .
Divisor 1 + λ ( 1 − α ) = 1 + 2 ⋅ 0.75 = 2.5 . Why this step? L2 squish; note the divisor is larger now because 1 − α = 0.75 is big (mostly Ridge).
Result w j = − 0.7/2.5 = − 0.28 . Why this step? Combine.
Verify: sign preserved (input negative, output negative) ✓. Magnitude 0.28 < 1.2 ✓. On the figure of Ex 1, this is the mirror-image left branch.
ρ j = 0.3 , λ = 1 , α = 0.5
Forecast: is w j small-but-nonzero, or exactly 0 ?
Threshold γ = λ α = 0.5 . Why this step? Dead-zone half-width.
Compare ∣ 0.3 ∣ = 0.3 ≤ 0.5 . Why this step? This is the survival test; here it fails .
Numerator S ( 0.3 , 0.5 ) = max ( 0.3 − 0.5 , 0 ) = max ( − 0.2 , 0 ) = 0 . Why this step? The max ( ⋅ , 0 ) clamps a negative shrink to exactly zero — that is why Lasso-style penalties give true sparsity, not just small numbers.
Result w j = 0/1.5 = 0 . Why this step? Zero divided by anything is zero; the L2 divisor cannot resurrect a killed feature.
Verify: feature dropped entirely — its correlation with the residual (0.3 ) was too weak to clear the 0.5 toll. This is exactly the flat red segment of the Soft-Thresholding Operator graph.
Worked example Ex 4a · boundary
ρ j = 0.5 , λ = 1 , α = 0.5
Forecast: on the razor's edge — does it survive?
Threshold γ = 0.5 . Why this step? Same.
Compare ∣ 0.5 ∣ = 0.5 , and the operator uses max (∣ z ∣ − γ , 0 ) = max ( 0 , 0 ) = 0 . Why this step? At exactly the boundary the subtraction gives 0 , so the feature is (just barely) killed.
Result w j = 0 . Why this step? Numerator is 0 .
Verify: the dead zone is closed — the endpoints belong to zero. Continuity check: as ρ j → 0. 5 + , w j → 0 + , matching this value. No jump. ✓
Worked example Ex 4b · degenerate
ρ j = 0 , λ = 3 , α = 0.7
A feature with zero current correlation.
S ( 0 , 3 ⋅ 0.7 ) = sign ( 0 ) max ( 0 − 2.1 , 0 ) = 0 . Why this step? sign ( 0 ) = 0 and the max is 0 anyway.
w j = 0/ ( 1 + 3 ⋅ 0.3 ) = 0/1.9 = 0 . Why this step? Divisor irrelevant once numerator is 0 .
Verify: a feature explaining nothing gets weight 0 regardless of the knobs. ✓
ρ j = 0.9 , λ = 1 , α = 1
Forecast: compare this answer to Ex 1 (same ρ j , λ but α = 0.5 ). Bigger or smaller w j ?
Threshold γ = λ α = 1 ⋅ 1 = 1 . Why this step? All the budget goes to L1, so the dead zone is wider .
Numerator S ( 0.9 , 1 ) = max ( 0.9 − 1 , 0 ) = 0 . Why this step? Now 0.9 < 1 , so even this fairly strong feature is killed.
Divisor 1 + λ ( 1 − α ) = 1 + 1 ⋅ 0 = 1 . Why this step? 1 − α = 0 means no L2 squish; this is exactly Lasso Regression .
Result w j = 0/1 = 0 . Why this step? Combine.
Verify: in Ex 1 the same feature survived at 0.267 ; here pure Lasso kills it because it spent all its budget on threshold. So α genuinely changes which features live, not just their size. ✓
ρ j = 0.3 , λ = 1 , α = 0
Forecast: in Ex 3 this weak feature (ρ j = 0.3 ) was killed. Does Ridge kill it too?
Threshold γ = λ α = 1 ⋅ 0 = 0 . Why this step? No L1 budget → no dead zone at all .
Numerator S ( 0.3 , 0 ) = sign ( 0.3 ) max ( 0.3 − 0 , 0 ) = 0.3 . Why this step? Zero threshold means soft-thresholding does nothing; the input passes straight through.
Divisor 1 + λ ( 1 − α ) = 1 + 1 ⋅ 1 = 2 . Why this step? All budget on L2; this is exactly Ridge Regression .
Result w j = 0.3/2 = 0.15 . Why this step? Pure proportional shrink.
Verify: unlike Ex 3, the weight is small but not zero (0.15 = 0 ). This is the headline fact of the Ridge world: shrink everything, zero nothing. ✓
Worked example Ex 7 · two identical features
x 1 = x 2 , OLS wants total weight 1
Forecast: Lasso might give ( 1 , 0 ) . What does Elastic Net give, ( 0.5 , 0.5 ) or something lopsided?
Suppose after the shared shrink each of w 1 , w 2 must satisfy w 1 + w 2 = W for some total W > 0 , and we minimize the L2 part w 1 2 + w 2 2 subject to that.
Set up the tie-break. Minimize g = w 1 2 + w 2 2 with w 1 + w 2 = W . Why this step? Along the correlated direction the data-fit and L1 terms are flat (see parent note), so only the strictly-convex L2 term decides.
Substitute w 2 = W − w 1 : g = w 1 2 + ( W − w 1 ) 2 . Why this step? Reduce to one variable.
Differentiate & set zero: g ′ ( w 1 ) = 2 w 1 − 2 ( W − w 1 ) = 0 ⇒ w 1 = W /2 . Why this step? The minimum of a smooth convex 1-D function is where its derivative vanishes.
Result w 1 = w 2 = W /2 : for W = 1 , each gets 0.5 . Why this step? Symmetry via convexity.
Verify: compare energies. Lasso split ( 1 , 0 ) : g = 1 2 + 0 2 = 1 . Even split ( 0.5 , 0.5 ) : g = 0.25 + 0.25 = 0.5 < 1 . So the L2 term strictly prefers the even split — that is the grouping effect made numerical. See Feature Correlation & Multicollinearity . ✓
The figure shows the flat trench along w 1 + w 2 = 1 (where data-fit + L1 are indifferent) and the L2 bowl whose lowest point on that trench sits dead-center at ( 0.5 , 0.5 ) .
Worked example Ex 8 · house-price model, feature "garage area"
You standardized all features. During Coordinate Descent you compute the partial residual correlation for garage area as ρ gar = 0.62 . Your cross-validated knobs are λ = 0.8 , α = 0.75 . Does the model keep the garage feature, and with what weight?
Forecast: guess "kept" or "dropped," and a ballpark weight.
Threshold γ = λ α = 0.8 ⋅ 0.75 = 0.6 . Why this step? Survival toll from the L1 flavor.
Survival test ∣ 0.62 ∣ = 0.62 > 0.6 → survives (barely). Why this step? Just clears the dead zone, so garage area is a genuinely useful predictor.
Numerator S ( 0.62 , 0.6 ) = 0.62 − 0.6 = 0.02 . Why this step? L1 shrink.
Divisor 1 + λ ( 1 − α ) = 1 + 0.8 ⋅ 0.25 = 1.2 . Why this step? L2 squish.
Result w gar = 0.02/1.2 = 0.01 6 . Why this step? Combine.
Verify: kept but with a tiny weight ≈ 0.017 — consistent with a feature sitting right on the edge of usefulness. Interpretation: garage area helps a sliver; nudge λ up a hair and it would be dropped. Units: everything is standardized, so w is unitless "std-of-y per std-of-feature." ✓
Worked example Ex 9 · what happens to
w j as λ → ∞ ?
Fix any ρ j and any α ∈ ( 0 , 1 ) . Take λ huge.
Threshold γ = λ α → ∞ . Why this step? The dead zone grows without bound, so eventually ∣ ρ j ∣ < λ α for every feature.
Numerator S ( ρ j , λ α ) → 0 once λ α > ∣ ρ j ∣ . Why this step? Everything falls inside the dead zone.
Result w j → 0 for all j . Why this step? Numerator hits zero (divisor only makes it smaller).
Numeric checkpoint: with ρ j = 0.9 , α = 0.5 , λ = 100 : γ = 50 ≫ 0.9 , so S = 0 and w j = 0 .
Verify: the model collapses to the all-zero (intercept-only) predictor — maximum bias, minimum variance, the far end of the Bias-Variance Tradeoff . Twist answer: if instead α = 0 (pure Ridge), the numerator is ρ j (never killed) but the divisor 1 + λ → ∞ , so w j → 0 too — same destination, different road (shrink vs kill). ✓
Common mistake Don't read these examples as "just use big
λ "
Examples 5, 6, 9 show the extremes so you understand the machinery — not the recommendation. In practice you sweep a 2-D grid over ( λ , α ) with Cross-Validation and pick the corner that generalizes best. The examples are your intuition for why each grid point behaves as it does.
Recall Predict the cell before revealing
If ρ j = − 0.4 and λ α = 0.5 , is w j zero? ::: Yes — ∣ − 0.4 ∣ = 0.4 ≤ 0.5 , inside the dead zone (Cell C/D), so w j = 0 .
With α = 0 , can any weight be exactly zero from the update alone? ::: No — threshold is 0 , so soft-thresholding never kills; only a divisor shrinks (Cell F).
Two identical features, total desired weight 2 — Elastic Net split? ::: ( 1 , 1 ) — the L2 term minimizes w 1 2 + w 2 2 at equality (Cell G).
As λ → ∞ with any fixed α , every w j → ? ::: 0 — the model collapses to intercept-only (Cell I).
Mnemonic The whole page in one picture
Threshold first (kill or keep), divide second (shrink). The horizontal ρ j enters, the dead zone decides life-or-death, the sub-unit slope decides how tame the survivors are.