In the language R there is the possibility to estimate the best $\lambda$ for an elastic net model via a cross-validation, having set the value of $\alpha$. However, being $\alpha$ defined as $\lambda_2/(\lambda_1+\lambda_2)$, where $\lambda_1$ and $\lambda_2$ are the coefficients of the penalizations for the ridge and lasso terms, how is $\lambda$ defined?


You're confused; $\alpha$ and $\lambda$ are totally different.

$\alpha$ sets the degree of mixing between ridge regression and lasso: when $\alpha = 0$, the elastic net does the former, and when $\alpha = 1$, it does the latter. Values of $\alpha$ between those extremes will give a result that is a blend of the two.

Meanwhile, $\lambda$ is the shrinkage parameter: when $\lambda = 0$, no shrinkage is performed, and as $\lambda$ increases, the coefficients are shrunk ever more strongly. This happens regardless of the value of $\alpha$.

| cite | improve this answer | |
  • $\begingroup$ My problem was that in my lecture notes the professor used the notation of $\lambda_1$ and $\lambda_2$ to identify the parameters of the ridge and the lasso regression, and from them he derives the generalization of the elastic net, setting $\alpha$ like in the question. Hence, I thought $\lambda$ of R was related to these parameters! :) $\endgroup$ – Pippo Jul 24 '13 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.