What a Coefficient Path Shows
An elastic net coefficient path displays fitted coefficient values across a range of penalty strengths. It is a compact way to see which coefficients are shrunk toward zero, which become exactly zero, and how the pattern changes when the balance between the ridge and lasso penalties changes. Reading the horizontal axis correctly matters: moving toward larger lambda means stronger penalization, while moving toward smaller lambda means weaker penalization.
For interpretation, assume the predictors have been centered and scaled, the response has been centered, and the intercept is not penalized. A path is conditional on the data, the scaling, the loss convention, and a fixed value of alpha. It is not a plot of uncertainty, and it does not by itself establish that a selected predictor is important outside the fitted model.
When alpha is 1, this objective is lasso; when alpha is 0, it is ridge. For intermediate alpha values, both penalties contribute. A path plot usually uses a logarithmic lambda axis because the useful values can span several orders of magnitude. Some software displays the path from strong to weak penalization; other displays reverse that direction. Always check the axis labels before describing a coefficient as entering or leaving.
A Useful Formula in an Orthogonal Design
A clean formula explains the basic path behavior. Suppose the columns of \(X\) are orthonormal, so \(X^\mathsf{T}X=I\), and define \(z_j=X_j^\mathsf{T}y\). Under the stated objective, each coefficient can be considered separately. For a positive \(z_j\), minimizing the objective for that coefficient gives the derivative equation \( \beta_j-z_j+\lambda(1-\alpha)\beta_j+\lambda\alpha=0\) whenever the solution is positive. Solving gives the expression below. The negative case follows by symmetry, and if the solution would have the opposite sign or be negative, the minimum is zero.
The numerator describes the lasso threshold: a coefficient is exactly zero whenever \(|z_j|\leq\lambda\alpha\). For \(\alpha>0\), the coefficient first becomes nonzero, as lambda is reduced from a sufficiently large value, at \(\lambda=|z_j|/\alpha\), provided \(z_j\neq0\). The denominator adds ridge shrinkage. With pure ridge, \(\alpha=0\), a nonzero \(z_j\) gives a coefficient that approaches zero as lambda increases but is not exactly zero at any finite lambda. This formula depends on orthogonal columns and the particular objective scaling; it is not a general formula for correlated predictors.
Worked Example: Finding Entry Points and Shrinkage
In a hypothetical standardized orthogonal regression, suppose the inner products \(z_j=X_j^\mathsf{T}y\) are \(2.4\), \(1.2\), and \(-0.6\). Use alpha \(=0.5\) to calculate the coefficients at lambda \(=0.4\) and lambda \(=1.2\), then find their entry points. Use the orthogonal-design formula and report coefficients to four decimal places.
At lambda \(=0.4\): the denominator is \(1+0.4(1-0.5)=1.2\), and the threshold is \(0.4(0.5)=0.2\). Thus \( \hat{\beta}_1=(2.4-0.2)/1.2=2.2/1.2=1.8333\); \( \hat{\beta}_2=(1.2-0.2)/1.2=1.0/1.2=0.8333\); and \( \hat{\beta}_3=-(0.6-0.2)/1.2=-0.4/1.2=-0.3333\). All three coefficients are nonzero.
At lambda \(=1.2\): the denominator is \(1+1.2(0.5)=1.6\), and the threshold is \(1.2(0.5)=0.6\). Therefore \( \hat{\beta}_1=(2.4-0.6)/1.6=1.8/1.6=1.1250\); \( \hat{\beta}_2=(1.2-0.6)/1.6=0.6/1.6=0.3750\); and \( \hat{\beta}_3=0\), because \(|z_3|=0.6\) is exactly at the threshold.
Entry points: as lambda decreases, the first coefficient enters at \(2.4/0.5=4.8\), the second at \(1.2/0.5=2.4\), and the third at \(0.6/0.5=1.2\). The signs are positive, positive, and negative, respectively. The value for the third coefficient agrees with its zero value at lambda \(=1.2\). The calculation checks: increasing lambda from \(0.4\) to \(1.2\) reduces the magnitudes and sets the weakest coefficient to zero. The method is soft-thresholding followed by ridge shrinkage; the common mistake it avoids is using the lasso threshold but forgetting the denominator.
How Alpha Changes the Path
Holding lambda fixed while changing alpha changes the relative penalties, not just the horizontal position on a plot. Increasing alpha gives greater weight to the absolute-value penalty, which can create exact zeros. Decreasing alpha gives greater weight to the squared-coefficient penalty, which tends to shrink coefficients continuously and, in correlated settings, can keep related predictors active together. Neither statement guarantees a particular coefficient will always get larger or smaller as alpha changes in a general design.
For orthogonal predictors, the formula makes the comparison direct. At a fixed lambda and nonzero \(z_j\), the threshold \(\lambda\alpha\) increases with alpha, while the ridge part of the denominator decreases. The combined effect depends on both quantities. For correlated predictors, coefficients also respond to one another through the design matrix, so simple one-coefficient intuition is not enough.
Worked Example: Comparing Alpha Values at One Lambda
For one coordinate in a standardized orthogonal model, let \(z=1.5\) and lambda \(=1\). Calculate its coefficient at alpha \(=0.25\), alpha \(=0.75\), and alpha \(=1\). Use the formula and give four decimal places.
At alpha \(=0.25\), the numerator is \(1.5-1(0.25)=1.25\), and the denominator is \(1+1(0.75)=1.75\). Thus \(\hat{\beta}=1.25/1.75=0.7143\).
At alpha \(=0.75\), the numerator is \(1.5-0.75=0.75\), and the denominator is \(1+0.25=1.25\). Thus \(\hat{\beta}=0.75/1.25=0.6000\).
At alpha \(=1\), the denominator is 1 and the numerator is \(1.5-1=0.5\), so the lasso coefficient is \(0.5000\). The sequence at this lambda is \(0.7143,\ 0.6000,\ 0.5000\). Here increasing alpha lowers the coefficient because the stronger threshold more than offsets the smaller denominator. This is a comparison for this specific orthogonal coordinate, not a universal monotonicity rule. The common mistake is to claim that every coefficient must decrease as alpha increases.
Reading Paths with Correlated Predictors
With correlated predictors, a coefficient is influenced by the other active coefficients. In matrix form, if the current active coefficients have signs collected in \(s\), their stationarity equations are $$ (X_A^\mathsf{T}X_A+\lambda(1-\alpha)I)\hat{\beta}_A = X_A^\mathsf{T}y-\lambda\alpha s. $$ This relation applies while the active set \(A\) and its signs remain unchanged. It helps explain why paths in correlated data need not look like separate soft-thresholded curves: changing lambda alters both shrinkage and the balance among predictors. Coefficients can flatten, change at different rates, or—in some designs—change sign or return to zero. A plotted path should be read from its actual trace rather than from an assumption that every magnitude decreases smoothly.
The grouping tendency associated with elastic net is especially relevant here. When predictors are strongly correlated and alpha is not too close to 1, related predictors may have more similar coefficient paths than they would under a lasso-dominant penalty. This is a tendency, not a guarantee that their coefficients are equal or that they enter at precisely the same lambda. The earlier material on grouping correlated predictors provides context for that pattern; the key task here is to recognize what the plotted paths show at the stated alpha.
Worked Example: Comparing Correlated-Predictor Paths
A hypothetical standardized two-predictor design has Gram matrix \(X^\mathsf{T}X=\begin{pmatrix}1&0.8\\0.8&1\end{pmatrix}\) and \(X^\mathsf{T}y=(1.4,1.3)^\mathsf{T}\). At lambda \(=1\), compare the fitted coefficients for alpha \(=0.2\) and alpha \(=0.8\), assuming both coefficients are positive. State why the active-set assumption is valid for the solutions found. Round to four decimals.
For positive coefficients, the sign vector is \(s=(1,1)^\mathsf{T}\). The active-set equation is the matrix equation above. At alpha \(=0.2\), the diagonal element is \(1+\lambda(1-\alpha)=1.8\), the off-diagonal element is \(0.8\), and the right side is \((1.4-0.2,\ 1.3-0.2)=(1.2,\ 1.1)\). The determinant is \(1.8^2-0.8^2=3.24-0.64=2.60\). Therefore \( \hat{\beta}_1=(1.8(1.2)-0.8(1.1))/2.60=(2.16-0.88)/2.60=0.4923\), and \( \hat{\beta}_2=(1.8(1.1)-0.8(1.2))/2.60=(1.98-0.96)/2.60=0.3923\).
At alpha \(=0.8\), the diagonal element is \(1+0.2=1.2\), the off-diagonal remains \(0.8\), and the right side is \((1.4-0.8,\ 1.3-0.8)=(0.6,\ 0.5)\). The determinant is \(1.2^2-0.8^2=1.44-0.64=0.80\). Thus \( \hat{\beta}_1=(1.2(0.6)-0.8(0.5))/0.80=(0.72-0.40)/0.80=0.4000\), and \( \hat{\beta}_2=(1.2(0.5)-0.8(0.6))/0.80=(0.60-0.48)/0.80=0.1500\).
All four calculated values are positive, so the assumed active signs are consistent with the solutions. In this example, the stronger lasso component at alpha \(=0.8\) produces smaller coefficients, particularly for the second predictor. The common mistake is to treat the predictors as independent coordinates despite their correlation of \(0.8\); the off-diagonal terms are essential to both solutions.
Practical Checks When Reading a Plot
A coefficient-path display is most useful when its setup is understood. Check the following before interpreting a curve:
- Direction: identify which side of the plot has larger lambda. Moving toward it means stronger penalization, even if the graphic is drawn in reverse order.
- Scale: check whether predictors were standardized. Coefficients on different predictor scales should not be compared by path height without considering the scaling.
- Penalty balance: confirm alpha. The same lambda does not impose the same combination of ridge and lasso penalties at different alpha values.
- Zeros and near-zeros: distinguish an exactly zero coefficient from a small nonzero one. A plotted line close to zero is not necessarily zero.
- Path shape: do not infer monotonicity, sign stability, or simultaneous entry unless the displayed paths support it.
A frequent exam error is to read a plot from left to right without checking whether lambda is increasing or decreasing. For example, a coefficient that leaves zero as the plotted curve moves right may be entering the model if the horizontal axis is moving toward smaller lambda. The correction is to state the axis direction first, then describe entry or shrinkage relative to increasing lambda. Another error is to compare path heights across alpha values as if the underlying scale and lambda grid were necessarily identical; confirm those conditions before making a direct comparison.
Check Your Understanding
For each problem, use the stated objective convention and distinguish conclusions that depend on orthogonality from those that do not.
- In an orthogonal design, \(z_1=1.8\), \(z_2=-0.9\), alpha \(=0.5\), and lambda \(=1\). Calculate both coefficients to four decimals. (Answer: \(0.8667,\ -0.2667\))
- For orthogonal coordinates \(z_1=1.2\), \(z_2=0.3\), and alpha \(=0.4\), at what lambda does each coordinate enter as lambda is reduced from a sufficiently large value? (Answer: \(\lambda_1=3,\ \lambda_2=0.75\))
- For one orthogonal coordinate with \(z=2\), alpha \(=0.25\), and lambda \(=2\), calculate the coefficient to four decimals. (Answer: \(0.6000\))
- A two-predictor standardized design has Gram matrix \(\begin{pmatrix}1&0.5\\0.5&1\end{pmatrix}\), \(X^\mathsf{T}y=(1,0.8)^\mathsf{T}\), alpha \(=0.5\), and lambda \(=0.4\). Assuming both coefficients are positive, calculate them to four decimals. (Answer: \(\hat{\beta}_1=0.5546,\ \hat{\beta}_2=0.2689\))
- For a nonzero orthogonal coordinate with \(z=1\) under pure ridge (\(\alpha=0\)), what is its coefficient at lambda \(=3\), and can it be exactly zero at any finite lambda? (Answer: \(0.2500\); no, it approaches zero but is nonzero for every finite lambda.)