Tuesday, June 7, 2022

AI/ML: Lasso regression basics

This is a regularization technique used in feature selection using a Shrinkage method also referred to as the penalized regression method. Lasso is short for Least Absolute Shrinkage and Selection Operator, which is used both for regularization and model selection. If a model uses the L1 regularization technique, then it is called lasso regression.


Lasso Regression for Regularization

In this shrinkage technique, the coefficients determined in the linear model from equation below are shrunk towards the central point as the mean by introducing a penalization factor called the alpha α (or sometimes lamda) values.


Alpha (α) is the penalty term that denotes the amount of shrinkage (or constraint) that will be implemented in the equation. With alpha set to zero, you will find that this is the equivalent of the linear regression model 

and a larger value penalizes the optimization function. Therefore, lasso regression shrinks the coefficients and helps to reduce the model complexity and multi-collinearity


Alpha (α) can be any real-valued number between zero and infinity; the larger the value, the more aggressive the penalization is


Lasso Regression for Model Selection


Due to the fact that coefficients will be shrunk towards a mean of zero, less important features in a dataset are eliminated when penalized. The shrinkage of these coefficients based on the alpha value provided leads to some form of automatic feature selection, as input variables are removed in an effective approach.

references:

https://www.datacamp.com/tutorial/tutorial-lasso-ridge-regression#data%20importation%20and%20eda

No comments:

Post a Comment