The Wayback Machine - https://web.archive.org/web/20240905191120/https://www.geeksforgeeks.org/parameters-feature-selection/
Open In App

Parameters for Feature Selection

Last Updated : 29 Apr, 2018
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow
Prerequisite : Introduction to Dimensionality Reduction Dimensionality reduction is the process of reducing the number of random variables under consideration, by obtaining a set of principal variables. It can be divided into feature selection and feature extraction. Dimensionality Reduction is an important factor in predictive modeling. Various proposed methods have introduced different approaches to do so by either graphically or by various other methods like filtering, wrapping or embedding. However, most of these approaches are based on some threshold values and benchmark algorithms that determine the optimality of the features in the dataset. One motivation for dimensionality reduction is that higher dimensional data sets increase the time complexity and also the space required will be more. Also, all the features in the dataset might not be useful. Some may contribute no information at all, while some may contribute similar information as the other features. Selecting the optimal set of features will help us hence reduce the space and time complexity as well as increase the accuracy or purity of classification (or regression) and clustering (or association) for supervised and unsupervised learning respectively. Feature selection has four different approaches such as filter approach, wrapper approach, embedded approach, and hybrid approach.
  1. Wrapper approach : This approach has high computational complexity. It uses a learning algorithm to evaluate the accuracy produced by the use of the selected features in classification. Wrapper methods can give high classification accuracy for particular classifiers.
  2. Filter approach : A subset of features is selected by this approach without using any learning algorithm. Higher-dimensional datasets use this method and it is relatively faster than the wrapper-based approaches.
  3. Embedded approach : The applied learning algorithms determine the specificity of this approach and it selects the features during the process of training the data set.
  4. Hybrid approach : Both filter and wrapper-based methods are used in hybrid approach. This approach first selects the possible optimal feature set which is further tested by the wrapper approach. It hence uses the advantages of both filter and wrapper-based approach.

Parameters For Feature Selection :

The parameters are classified based on two factors – The Similarity of information contributed by the features : 1. CORRELATION The features are classified as associated or similar mostly based on their correlation factor. In the data set, we have many features which are correlated. Now the problem with having correlated features is that, if f1 and f2 are two correlated features of a data set, then the classifying or regression model including both f1 and f2 will give the same as the predictive model compared to the scenario where either f1 or f2 was included in the dataset. This is because both f1 and f2 are correlated and hence they contribute the same information regarding the model in the data set. There are various methods to calculate the correlation factor, however, Pearson’s correlation coefficient is most widely used. The formula for Pearson’s correlation coefficient(  {\displaystyle \rho ) is:    {\displaystyle \rho _{X, Y}={\frac {\operatorname {cov} (X, Y)}{\sigma _{X}\sigma _{Y}\newline}}}
where 
cov(X, Y) - covariance
sigma(X) - standard deviation of X
sigma(Y) - standard deviation of Y
Thus, the correlated features are irrelevant, as they all contribute similar information. Only one representative of the whole correlated or associated features would give the same classification or regression outcome. Hence these features are redundant and excluded for dimensionality reduction purposes after selecting a particular representative from each associated or correlated group of features using various algorithms.   Quantum of information contributed by the features : 1. ENTROPY Entropy is the measure of the average information content. The higher the entropy, the higher is the information contribution by that feature. Entropy (H) can be formulated as:    {\displaystyle \mathrm {H} (X)=\mathrm {E} [\mathrm {I} (X)]=\mathrm {E} [-\ln(\mathrm {P} (X))]\newline}
where
X - discrete random variable X
P(X) - probability mass function
E - expected value operator, 
I - information content of X.
I(X) - a random variable.
In Data Science, entropy of a feature f1 is calculated by excluding feature f1 and then calculating the entropy of the rest of the features. Now, the lower the entropy value (excluding f1) the higher will be the information content of f1. In this manner the entropy of all the features is calculated. At the end, either a threshold value or further relevancy check determines the optimality of the features on the basis of which features are selected. Entropy is mostly used for Unsupervised Learning as we do have a class field in the dataset and hence entropy of the features can give substantial information. 2. MUTUAL INFORMATION In information theory, mutual information I(X;Y) is the amount of uncertainty in X due to the knowledge of Y. Mathematically, mutual information is defined as  {\displaystyle I(X;Y)=\sum _{y\in Y}\sum _{x\in X}p(x, y)\log {\left({\frac {p(x, y)}{p(x)\, p(y)}}\right)\newline}}
where 
p(x, y) - joint probability function of X and Y,
p(x) - marginal probability distribution function of X
p(y) - marginal probability distribution function of Y
Mutual Information in Data science is mostly calculated to know the amount of information shared about the class by a feature. Hence is mostly used for dimensionality reduction in Supervised Learning. The features which have high mutual information value corresponding to the class in a supervised learning are considered optimal since they can influence the predictive model towards the right prediction and hence increase the accuracy of the model.   Reference : http://www.cs.uccs.edu/~jkalita/papers/2014/HoqueExpertSystems2014.pdf


Similar Reads

Difference Between Feature Selection and Feature Extraction
Machine learning models require input features that are relevant and important to predict the outcome. However, not all features are equally important for a prediction task, and some features might even introduce noise in the model. Feature selection and feature extraction are two methods to handle this problem. In this article, we will explore the
8 min read
LightGBM Feature parameters
LightGBM (Light gradient-boosting machine) is a gradient-boosting framework developed by Microsoft, known for its impressive performance and less memory usage. In this article, we'll explore LightGBM's feature parameters while working with the Wisconsin Breast Cancer dataset. What is LightGBM?Microsoft's LightGBM (Light Gradient Boosting Machine) i
10 min read
Is There Any Difference Between Feature Extraction and Feature Learning?
Answer: Yes, feature extraction involves manually selecting characteristics from data, while feature learning allows models to automatically discover the features to be used for a task.Feature extraction and feature learning represent two methodologies in machine learning for identifying and utilizing relevant information from raw data to improve m
1 min read
ML | Extra Tree Classifier for Feature Selection
Prerequisites: Decision Tree Classifier Extremely Randomized Trees Classifier(Extra Trees Classifier) is a type of ensemble learning technique which aggregates the results of multiple de-correlated decision trees collected in a "forest" to output it's classification result. In concept, it is very similar to a Random Forest Classifier and only diffe
6 min read
Feature Selection using Branch and Bound Algorithm
Feature selection is a very important factor in Machine Learning. To get the algorithms to work properly and give near about perfect predictions, i.e to enhance the performance of a predictive model, feature selection is required. Large set of features or redundant ones should be removed. Up to a certain number of features, the accuracy of a classi
4 min read
Feature Subset Selection Process
Feature Selection is the most critical pre-processing activity in any machine learning process. It intends to select a subset of attributes or features that makes the most meaningful contribution to a machine learning activity. In order to understand it, let us consider a small example i.e. Predict the weight of students based on the past informati
12 min read
SVM with Univariate Feature Selection in Scikit Learn
Support Vector Machines (SVM) is a powerful machine learning algorithm used for classification and regression analysis. It is based on the idea of finding the optimal boundary between two classes that maximizes the margin between them. However, the challenge with SVM is that it requires a large amount of computational power and is sensitive to the
10 min read
Joint Feature Selection with multi-task Lasso in Scikit Learn
This article is likely to introduces the concepts of Lasso and multitask Lasso regression and demonstrates how to implement these methods in Python using the scikit-learn library. The article is going to cover the differences between Lasso and multitask Lasso and provide guidance on which method to prefer in different situations. It may also provid
7 min read
Sequential Feature Selection
Feature selection is a process of identifying and selecting the most relevant features from a dataset for a particular predictive modeling task. This can be done for a variety of reasons, such as to improve the predictive accuracy of a model, to reduce the computational complexity of a model, or to make a model more interpretable. This article focu
3 min read
Feature Agglomeration vs Univariate Selection in Scikit Learn
Selecting the most relevant characteristics for a given job is the aim of feature selection, a crucial stage in machine learning. Feature Agglomeration and Univariate Selection are two popular methods for feature selection in Scikit-Learn. These techniques aid in the reduction of dimensionality, increase model effectiveness, and maybe improve model
4 min read
Is Feature Selection Necessary?
Answer: Feature selection is necessary to improve model interpretability, reduce computational complexity, and enhance model generalization by selecting relevant features and eliminating irrelevant or redundant ones.Feature selection, while not always mandatory, is crucial in many machine learning tasks due to several reasons: Improved Model Interp
2 min read
How can Feature Selection reduce overfitting?
The development of precise models is essential for predicted performance in the rapidly developing area of machine learning. The possibility of overfitting, in which a model picks up noise and oscillations unique to the training set in addition to the underlying patterns in the data, presents an inherent problem. As a potent weapon against overfitt
8 min read
Feature selection using SelectFromModel and LassoCV in Scikit Learn
Feature selection is a critical step in machine learning and data analysis, aimed at identifying and retaining the most relevant variables in a dataset. It not only enhances model performance but also reduces overfitting and improves interpretability. In this guide, we delve into the world of feature selection using Scikit-Learn, a popular Python l
7 min read
Feature selection using Decision Tree
Feature selection using decision trees involves identifying the most important features in a dataset based on their contribution to the decision tree's performance. The article aims to explore feature selection using decision trees and how decision trees evaluate feature importance. What is feature selection?Feature selection involves choosing a su
5 min read
Feature Selection Techniques in Machine Learning
Feature selection: Feature selection is a process that chooses a subset of features from the original features so that the feature space is optimally reduced according to a certain criterion.  Feature selection is a critical step in the feature construction process. In text categorization problems, some words simply do not appear very often. Perhap
8 min read
Feature Selection Using Random Forest
Feature selection is a crucial step in building machine learning models. It involves selecting the most important features from your dataset that contribute to the predictive power of the model. Random Forest, an ensemble learning method, is widely used for feature selection due to its inherent ability to rank features based on their importance. Th
4 min read
Feature Selection Using Random forest Classifier
Feature selection is a crucial step in the machine learning pipeline that involves identifying the most relevant features for building a predictive model. One effective method for feature selection is using a Random Forest classifier, which provides insights into feature importance. In this article, we will explore how to use a Random Forest classi
5 min read
Feature Selection in Python with Scikit-Learn
Feature selection is a crucial step in the machine learning pipeline. It involves selecting the most important features from your dataset to improve model performance and reduce computational cost. In this article, we will explore various techniques for feature selection in Python using the Scikit-Learn library. What is feature selection?Feature se
4 min read
Optimal feature selection for Support Vector Machines
In machine learning, feature selection is an essential phase, particularly when working with high-dimensional datasets. Although Support Vector Machines (SVMs) are strong classifiers, the features that are used might affect how well they perform. This post will discuss the idea of ideal feature selection for support vector machines (SVMs), its sign
7 min read
Performing Feature Selection with gridsearchcv in Sklearn
Feature selection is a crucial step in machine learning, as it helps to identify the most relevant features in a dataset that contribute to the model's performance. One effective way to perform feature selection is by combining it with hyperparameter tuning using GridSearchCV from scikit-learn. In this article, we will delve into the details of how
4 min read
SVM Feature Selection in R with Example
In machine learning, SVM is often praised for its robustness and accuracy, particularly in binary classification problems. However, like any model, its performance can be heavily dependent on the input features. Effective feature selection not only simplifies the model by reducing the number of variables but also can lead to improvements in model p
4 min read
Chi-Square Test for Feature Selection - Mathematical Explanation
One of the primary tasks involved in any supervised Machine Learning venture is to select the best features from the given dataset to obtain the best results. One way to select these features is the Chi-Square Test. Mathematically, a Chi-Square test is done on two distributions two determine the level of similarity of their respective variances. In
4 min read
How to Perform Feature Selection for Regression Data
Feature selection is a crucial step in the data preprocessing pipeline for regression tasks. It involves identifying and selecting the most relevant features (or variables) that contribute to the prediction of the target variable. This process helps in reducing the complexity of the model, improving its performance, and making it more interpretable
8 min read
TensorFlow - How to broadcasts parameters for evaluation on an N-D grid
TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. While working with TensorFlow some operations automatically broadcast parameters and sometimes we have to explicitly broadcast parameters. To explicitly broadcast parameters meshgrid method is used. Method Used: meshgrid
2 min read
CatBoost Parameters and Hyperparameters
For gradient boosting on decision trees, CatBoost is a well-liked open-source toolkit. It was created by Yandex and may be applied to a range of machine-learning issues, including classification, regression, ranking, and more. Compared to other boosting libraries, CatBoost has a number of benefits, including: It can handle categorical features auto
12 min read
Sklearn | Model Hyper-parameters Tuning
Hyperparameter tuning is the process of finding the optimal values for the hyperparameters of a machine-learning model. Hyperparameters are parameters that control the behaviour of the model but are not learned during training. Hyperparameter tuning is an important step in developing machine learning models because it can significantly improve the
12 min read
CatBoost Tree Parameters
CatBoost is a popular gradient-boosting library known for its effectiveness in machine-learning competitions. It is particularly well-suited for tabular data and has several parameters that can be tuned to improve model performance. In this article, we will focus on CatBoost's tree-related parameters and explore how they influence the model's behav
15+ min read
LightGBM Regularization parameters
LightGBM is a powerful gradient-boosting framework that has gained immense popularity in the field of machine learning and data science. It is renowned for its efficiency and effectiveness in handling large datasets and high-dimensional features. One of the key reasons behind its success is its ability to incorporate various regularization techniqu
11 min read
LightGBM Tree Parameters
In the ever-evolving landscape of machine learning, gradient-boosting algorithms have gained significant traction due to their exceptional predictive power and versatility. Among these, LightGBM stands out as a highly efficient and scalable framework. In this article, we will delve into the tree parameters of LightGBM, exploring how they influence
5 min read
LightGBM Learning Control Parameters
In this article, we will delve into the realm of LightGBM's learning control parameters, understanding their significance and impact on the model's performance. What is LightGBM? LightGBM is a powerful gradient-boosting framework that has gained immense popularity in the fields of machine learning and data science. Light GBM is open-source, develop
6 min read