Feature Selection with Lasso
Feature selection is one of the most important steps to be performed before building any kind of machine learning model. In a dataset, not all the columns are going to have an impact on the dependent variable. If we include all the irrelevant features for model building, we'll end up building a model with bad performance. This gives rise to the need to perform feature selection. In this section, we will be performing feature selection using the lasso
method.
Lasso regularization is a method of feature selection where the coefficients of irrelevant features are set to zero. By doing so, we remove the features that are insignificant and only the remaining significant features are included for further analysis.
Let's perform lasso regularization for our mean- and iterative-imputed DataFrames.
Lasso Regularization for Mean-Imputed DataFrames
Let's perform lasso regularization for the mean-imputed DataFrame 1.
As the first...