Feature Selection (Intrinsic Methods)
Feature Selection refers to the process of selecting the most appropriate features for making the model. Here, you can learn all about it.
We'll cover the following
Intrinsic or Embedded Methods
Embedded methods learn about the features that contribute the most to the model’s performance while the model is being created. You have seen Feature Selection methods in the previous lessons, and we will discuss several more in future lessons, like Decision Tree based methods.
-
Ridge Regression (L2-Regularization)
-
Lasso Regression (L1-Regularization)
-
Elastic-Net Regression (uses both L1 and L2 Regularization)
-
Decision Tree-Based Methods (Decision Tree Classification, Random Forest Classification, XgBoost Classification, LightGBM).
We know regularization reduces some of the parameters in the equation below to zero. This property of regularization methods can be used as a Feature Selection Method.
Scikit Learn implementation
We have already covered the implementation of regularization models like Ridge, Lasso, and Elastic-net regression in the previous lessons.
-
Scikit Learn provides a
SelectFromModel
class. -
It is used with models that provide
coef_
orfeature_importance_
attributes. -
It takes in a
threshold
parameter. -
The features are considered unimportant and removed if the corresponding
coef_
orfeature_importances_
values are below the providedthreshold
parameter.
Get hands-on with 1400+ tech skills courses.