The penalty term for Elastic regression is written as enter image description here

How are the values of lambda's calculated if the slider is moved from the right to the left. I have read most the material available on the internet on Elastic Net Regression. Here they define, $\alpha=\lambda_2/(\lambda_1 + \lambda_2)$. If the value of $\lambda_2 $ and $\alpha$ is given, then $\lambda_1$ is calculated. In Orange the slider is provided.

If the slider goes from 0 to 1, one possibility:

$$\lambda_1 = 1 - \lambda_2$$

Finally I found the answer. In elastic net the cost function is written as $J(\theta)=MSE + r\alpha\sum_{i=1}^n \vert\theta_i \vert + \frac {1-r}{2}\alpha\sum_{1=1}^n \theta_i ^2 $. Here r is the ratio, $\alpha$ is the hyperparameter and n is the number of features. The ratio slider controls r and $\alpha$ slider controls the value of hyperparameter. If the ratio r=0, then Elastic net regression is equal to ridge regression. For r=1, the Elastic Net Regression is equal to Lasso regression. I hope this perfectly answers the question I posed. I would like to have comments from followers of this post.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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