Describe the least angle regression (LAR) algorithm and how it relates to the lasso path. In the case X=I2 (two orthonormal columns) with y=(3,1): what is the path of coefficients as a function of the penalty λ, and where does each variable enter?

Supervised learning, Least angle regression
Level L4 Advanced. Length Long. Nature Th+Mat Both.

What's being asked

Whether you understand LAR as moving in an equiangular direction until a new variable ties in correlation, and that a small change gives the lasso path.

Key idea

LAR keeps all active variables equally correlated with the residual. For the lasso, the same path is traced, except that a variable whose coefficient hits zero is dropped from the active set.

Steps

  1. Start with all coefficients 0 and residual r=y. Find the variable most correlated with r and move its coefficient towards its least-squares value.
  2. Continue until another variable has the same absolute correlation with the residual. Add it to the active set A.
  3. Now move the coefficients of A along the direction XA(XA⊤XA)−11 (the equiangular direction), so every active variable keeps the same correlation with the shrinking residual. Stop when the next variable ties. Repeat until all variables are in, ending at the least-squares fit.
  4. Lasso modification: if an active coefficient crosses zero, remove its variable from A and continue. Without this step, the LAR path can differ from the lasso path.
  5. Example: X⊤y=(3,1), so x1 is the most correlated. Moving along x1 gives r=(3−β1,1), and the correlations tie when 3−β1=1, at β1=2. Residual is then (1,1).
  6. Both variables are active. The equiangular direction is (1,1), so both coefficients rise at the same rate until the residual is 0: β=(3,1), the OLS solution.
  7. Compare with the lasso, min⁡12∥y−Xβ∥2+λ∥β∥1. For orthonormal X, β^j(λ)=sign⁡(zj)(∣zj∣−λ)+ with z=X⊤y. So β1=3−λ for λ≤3 (and 0 above), and β2=1−λ for λ≤1 (and 0 above). Variable 1 enters at λ=3 and variable 2 at λ=1. At λ=1, β=(2,0), the same as LAR. The path is piecewise linear and identical.

Common mistakes

How long your answer should be

Roughly one page, 7–8 minutes.

Last checked on 4 December 2026.

Read this

Previous in Supervised learning: Prove the perceptron convergence theorem: if there is a unit vector w∗ and a margin γ>0 such that yi(w∗⊤xi)≥γ for all i, and ∥xi∥≤R, then the perceptron (starting from w=0) makes at most (R/γ)2 mistakes. Why does the bound not depend on the number of points or the dimension?
Next in Supervised learning: A 1-D dataset has x=−1 with y=0 and x=+1 with y=1, and the model is P(y=1∣x)=σ(wx) (no intercept). How do you show that the maximum-likelihood estimate does not exist, what happens to the Hessian, and how does an L2 penalty fix it?