Feature selection is the process of selecting a subset of relevant features (variables, predictors) for use in model construction. Stylometry and DNA microarray analysis are two cases where feature selection is used. It should be distinguished from feature extraction.^{[1]}
Feature selection techniques are used for several reasons:
simplification of models to make them easier to interpret by researchers/users,^{[2]}
improve data's compatibility with a learning model class,^{[5]}
encode inherent symmetries present in the input space.^{[6]}^{[7]}^{[8]}^{[9]}
The central premise when using a feature selection technique is that the data contains some features that are either redundant or irrelevant, and can thus be removed without incurring much loss of information.^{[10]}Redundant and irrelevant are two distinct notions, since one relevant feature may be redundant in the presence of another relevant feature with which it is strongly correlated.^{[11]}
Feature extraction creates new features from functions of the original features, whereas feature selection returns a subset of the features. Feature selection techniques are often used in domains where there are many features and comparatively few samples (or data points).
Introduction
A feature selection algorithm can be seen as the combination of a search technique for proposing new feature subsets, along with an evaluation measure which scores the different feature subsets. The simplest algorithm is to test each possible subset of features finding the one which minimizes the error rate. This is an exhaustive search of the space, and is computationally intractable for all but the smallest of feature sets. The choice of evaluation metric heavily influences the algorithm, and it is these evaluation metrics which distinguish between the three main categories of feature selection algorithms: wrappers, filters and embedded methods.^{[11]}
Wrapper methods use a predictive model to score feature subsets. Each new subset is used to train a model, which is tested on a hold-out set. Counting the number of mistakes made on that hold-out set (the error rate of the model) gives the score for that subset. As wrapper methods train a new model for each subset, they are very computationally intensive, but usually provide the best performing feature set for that particular type of model or typical problem.
Filter methods use a proxy measure instead of the error rate to score a feature subset. This measure is chosen to be fast to compute, while still capturing the usefulness of the feature set. Common measures include the mutual information,^{[11]} the pointwise mutual information,^{[12]}Pearson product-moment correlation coefficient, Relief-based algorithms,^{[13]} and inter/intra class distance or the scores of significance tests for each class/feature combinations.^{[12]}^{[14]} Filters are usually less computationally intensive than wrappers, but they produce a feature set which is not tuned to a specific type of predictive model.^{[15]} This lack of tuning means a feature set from a filter is more general than the set from a wrapper, usually giving lower prediction performance than a wrapper. However the feature set doesn't contain the assumptions of a prediction model, and so is more useful for exposing the relationships between the features. Many filters provide a feature ranking rather than an explicit best feature subset, and the cut off point in the ranking is chosen via cross-validation. Filter methods have also been used as a preprocessing step for wrapper methods, allowing a wrapper to be used on larger problems. One other popular approach is the Recursive Feature Elimination algorithm,^{[16]} commonly used with Support Vector Machines to repeatedly construct a model and remove features with low weights.
Embedded methods are a catch-all group of techniques which perform feature selection as part of the model construction process. The exemplar of this approach is the LASSO method for constructing a linear model, which penalizes the regression coefficients with an L1 penalty, shrinking many of them to zero. Any features which have non-zero regression coefficients are 'selected' by the LASSO algorithm. Improvements to the LASSO include Bolasso which bootstraps samples;^{[17]}Elastic net regularization, which combines the L1 penalty of LASSO with the L2 penalty of ridge regression; and FeaLect which scores all the features based on combinatorial analysis of regression coefficients.^{[18]} AEFS further extends LASSO to nonlinear scenario with autoencoders.^{[19]} These approaches tend to be between filters and wrappers in terms of computational complexity.
In traditional regression analysis, the most popular form of feature selection is stepwise regression, which is a wrapper technique. It is a greedy algorithm that adds the best feature (or deletes the worst feature) at each round. The main control issue is deciding when to stop the algorithm. In machine learning, this is typically done by cross-validation. In statistics, some criteria are optimized. This leads to the inherent problem of nesting. More robust methods have been explored, such as branch and bound and piecewise linear network.
Subset selection
Subset selection evaluates a subset of features as a group for suitability. Subset selection algorithms can be broken up into wrappers, filters, and embedded methods. Wrappers use a search algorithm to search through the space of possible features and evaluate each subset by running a model on the subset. Wrappers can be computationally expensive and have a risk of over fitting to the model. Filters are similar to wrappers in the search approach, but instead of evaluating against a model, a simpler filter is evaluated. Embedded techniques are embedded in, and specific to, a model.
Many popular search approaches use greedyhill climbing, which iteratively evaluates a candidate subset of features, then modifies the subset and evaluates if the new subset is an improvement over the old. Evaluation of the subsets requires a scoring metric that grades a subset of features. Exhaustive search is generally impractical, so at some implementor (or operator) defined stopping point, the subset of features with the highest score discovered up to that point is selected as the satisfactory feature subset. The stopping criterion varies by algorithm; possible criteria include: a subset score exceeds a threshold, a program's maximum allowed run time has been surpassed, etc.
Alternative search-based techniques are based on targeted projection pursuit which finds low-dimensional projections of the data that score highly: the features that have the largest projections in the lower-dimensional space are then selected.
Two popular filter metrics for classification problems are correlation and mutual information, although neither are true metrics or 'distance measures' in the mathematical sense, since they fail to obey the triangle inequality and thus do not compute any actual 'distance' – they should rather be regarded as 'scores'. These scores are computed between a candidate feature (or set of features) and the desired output category. There are, however, true metrics that are a simple function of the mutual information;^{[30]} see here.
The choice of optimality criteria is difficult as there are multiple objectives in a feature selection task. Many common criteria incorporate a measure of accuracy, penalised by the number of features selected. Examples include Akaike information criterion (AIC) and Mallows's C_{p}, which have a penalty of 2 for each added feature. AIC is based on information theory, and is effectively derived via the maximum entropy principle.^{[31]}^{[32]}
Other criteria are Bayesian information criterion (BIC), which uses a penalty of ${\sqrt {\log {n))))$ for each added feature, minimum description length (MDL) which asymptotically uses ${\sqrt {\log {n))))$, Bonferroni / RIC which use ${\sqrt {2\log {p))))$, maximum dependency feature selection, and a variety of new criteria that are motivated by false discovery rate (FDR), which use something close to ${\sqrt {2\log {\frac {p}{q))))$. A maximum entropy rate criterion may also be used to select the most relevant subset of features.^{[33]}
Structure learning
Filter feature selection is a specific case of a more general paradigm called structure learning. Feature selection finds the relevant feature set for a specific target variable whereas structure learning finds the relationships between all the variables, usually by expressing these relationships as a graph. The most common structure learning algorithms assume the data is generated by a Bayesian Network, and so the structure is a directedgraphical model. The optimal solution to the filter feature selection problem is the Markov blanket of the target node, and in a Bayesian Network, there is a unique Markov Blanket for each node.^{[34]}
Information Theory Based Feature Selection Mechanisms
There are different Feature Selection mechanisms around that utilize mutual information for scoring the different features. They usually use all the same algorithm:
Calculate the mutual information as score for between all features ($f_{i}\in F$) and the target class (c)
Select the feature with the largest score (e.g. ${\underset {f_{i}\in F}{\operatorname {argmax} ))(I(f_{i},c))$) and add it to the set of selected features (S)
Select the feature with the largest score and add it to the set of select features (e.g. ${\underset {f_{i}\in F}{\operatorname {argmax} ))(I_{derived}(f_{i},c))$)
Repeat 3. and 4. until a certain number of features is selected (e.g. $|S|=l$)
The simplest approach uses the mutual information as the "derived" score.^{[35]}
However, there are different approaches, that try to reduce the redundancy between features.
Peng et al.^{[36]} proposed a feature selection method that can use either mutual information, correlation, or distance/similarity scores to select features. The aim is to penalise a feature's relevancy by its redundancy in the presence of the other selected features. The relevance of a feature set S for the class c is defined by the average value of all mutual information values between the individual feature f_{i} and the class c as follows:
Suppose that there are n full-set features. Let x_{i} be the set membership indicator function for feature f_{i}, so that x_{i}=1 indicates presence and x_{i}=0 indicates absence of the feature f_{i} in the globally optimal feature set. Let $c_{i}=I(f_{i};c)$ and $a_{ij}=I(f_{i};f_{j})$. The above may then be written as an optimization problem:
The mRMR algorithm is an approximation of the theoretically optimal maximum-dependency feature selection algorithm that maximizes the mutual information between the joint distribution of the selected features and the classification variable. As mRMR approximates the combinatorial estimation problem with a series of much smaller problems, each of which only involves two variables, it thus uses pairwise joint probabilities which are more robust. In certain situations the algorithm may underestimate the usefulness of features as it has no way to measure interactions between features which can increase relevancy. This can lead to poor performance^{[35]} when the features are individually useless, but are useful when combined (a pathological case is found when the class is a parity function of the features). Overall the algorithm is more efficient (in terms of the amount of data required) than the theoretically optimal max-dependency selection, yet produces a feature set with little pairwise redundancy.
mRMR is an instance of a large class of filter methods which trade off between relevancy and redundancy in different ways.^{[35]}^{[37]}
Quadratic programming feature selection
mRMR is a typical example of an incremental greedy strategy for feature selection: once a feature has been selected, it cannot be deselected at a later stage. While mRMR could be optimized using floating search to reduce some features, it might also be reformulated as a global quadratic programming optimization problem as follows:^{[38]}
where $F_{n\times 1}=[I(f_{1};c),\ldots ,I(f_{n};c)]^{T))$ is the vector of feature relevancy assuming there are n features in total, $H_{n\times n}=[I(f_{i};f_{j})]_{i,j=1\ldots n))$ is the matrix of feature pairwise redundancy, and $\mathbf {x} _{n\times 1))$ represents relative feature weights. QPFS is solved via quadratic programming. It is recently shown that QFPS is biased towards features with smaller entropy,^{[39]} due to its placement of the feature self redundancy term $I(f_{i};f_{i})$ on the diagonal of H.
Conditional mutual information
Another score derived for the mutual information is based on the conditional relevancy:^{[39]}
where $Q_{ii}=I(f_{i};c)$ and $Q_{ij}=(I(f_{i};c|f_{j})+I(f_{j};c|f_{i}))/2,i\neq j$.
An advantage of SPEC_{CMI} is that it can be solved simply via finding the dominant eigenvector of Q, thus is very scalable. SPEC_{CMI} also handles second-order feature interaction.
Joint mutual information
In a study of different scores Brown et al.^{[35]} recommended the joint mutual information^{[40]} as a good score for feature selection. The score tries to find the feature, that adds the most new information to the already selected features, in order to avoid redundancy. The score is formulated as follows:
The score uses the conditional mutual information and the mutual information to estimate the redundancy between the already selected features ($f_{j}\in S$) and the feature under investigation ($f_{i))$).
Hilbert-Schmidt Independence Criterion Lasso based feature selection
For high-dimensional and small sample data (e.g., dimensionality > 10^{5} and the number of samples < 10^{3}), the Hilbert-Schmidt Independence Criterion Lasso (HSIC Lasso) is useful.^{[41]} HSIC Lasso optimization problem is given as
where ${\mbox{HSIC))(f_{k},c)={\mbox{tr))({\bar {\mathbf {K} ))^{(k)}{\bar {\mathbf {L} )))$ is a kernel-based independence measure called the (empirical) Hilbert-Schmidt independence criterion (HSIC), ${\mbox{tr))(\cdot )$ denotes the trace, $\lambda$ is the regularization parameter, ${\bar {\mathbf {K} ))^{(k)}=\mathbf {\Gamma } \mathbf {K} ^{(k)}\mathbf {\Gamma }$ and ${\bar {\mathbf {L} ))=\mathbf {\Gamma } \mathbf {L} \mathbf {\Gamma }$ are input and output centered Gram matrices, $K_{i,j}^{(k)}=K(u_{k,i},u_{k,j})$ and $L_{i,j}=L(c_{i},c_{j})$ are Gram matrices, $K(u,u')$ and $L(c,c')$ are kernel functions, $\mathbf {\Gamma } =\mathbf {I} _{m}-{\frac {1}{m))\mathbf {1} _{m}\mathbf {1} _{m}^{T))$ is the centering matrix, $\mathbf {I} _{m))$ is the m-dimensional identity matrix (m: the number of samples), $\mathbf {1} _{m))$ is the m-dimensional vector with all ones, and $\|\cdot \|_{1))$ is the $\ell _{1))$-norm. HSIC always takes a non-negative value, and is zero if and only if two random variables are statistically independent when a universal reproducing kernel such as the Gaussian kernel is used.
where $\|\cdot \|_{F))$ is the Frobenius norm. The optimization problem is a Lasso problem, and thus it can be efficiently solved with a state-of-the-art Lasso solver such as the dual augmented Lagrangian method.
Correlation feature selection
The correlation feature selection (CFS) measure evaluates subsets of features on the basis of the following hypothesis: "Good feature subsets contain features highly correlated with the classification, yet uncorrelated to each other".^{[42]}^{[43]} The following equation gives the merit of a feature subset S consisting of k features:
Here, ${\overline {r_{cf))))$ is the average value of all feature-classification correlations, and ${\overline {r_{ff))))$ is the average value of all feature-feature correlations. The CFS criterion is defined as follows:
The features from a decision tree or a tree ensemble are shown to be redundant. A recent method called regularized tree^{[45]} can be used for feature subset selection. Regularized trees penalize using a variable similar to the variables selected at previous tree nodes for splitting the current node. Regularized trees only need build one tree model (or one tree ensemble model) and thus are computationally efficient.
Regularized trees naturally handle numerical and categorical features, interactions and nonlinearities. They are invariant to attribute scales (units) and insensitive to outliers, and thus, require little data preprocessing such as normalization. Regularized random forest (RRF)^{[46]} is one type of regularized trees. The guided RRF is an enhanced RRF which is guided by the importance scores from an ordinary random forest.
Overview on metaheuristics methods
A metaheuristic is a general description of an algorithm dedicated to solve difficult (typically NP-hard problem) optimization problems for which there is no classical solving methods. Generally, a metaheuristic is a stochastic algorithm tending to reach a global optimum. There are many metaheuristics, from a simple local search to a complex global search algorithm.
Main principles
The feature selection methods are typically presented in three classes based on how they combine the selection algorithm and the model building.
Filter method
Filter type methods select variables regardless of the model. They are based only on general features like the correlation with the variable to predict. Filter methods suppress the least interesting variables. The other variables will be part of a classification or a regression model used to classify or to predict data. These methods are particularly effective in computation time and robust to overfitting.^{[47]}
Filter methods tend to select redundant variables when they do not consider the relationships between variables. However, more elaborate features try to minimize this problem by removing variables highly correlated to each other, such as the Fast Correlation Based Filter (FCBF) algorithm.^{[48]}
Wrapper method
Wrapper methods evaluate subsets of variables which allows, unlike filter approaches, to detect the possible interactions amongst variables.^{[49]} The two main disadvantages of these methods are:
The increasing overfitting risk when the number of observations is insufficient.
The significant computation time when the number of variables is large.
Embedded method
Embedded methods have been recently proposed that try to combine the advantages of both previous methods. A learning algorithm takes advantage of its own variable selection process and performs feature selection and classification simultaneously, such as the FRMT algorithm.^{[50]}
Application of feature selection metaheuristics
This is a survey of the application of feature selection metaheuristics lately used in the literature. This survey was realized by J. Hammon in her 2013 thesis.^{[47]}
Local learning based feature selection.^{[76]} Compared with traditional methods, it does not involve any heuristic search, can easily handle multi-class problems, and works for both linear and nonlinear problems. It is also supported by a strong theoretical foundation. Numeric experiments showed that the method can achieve a close-to-optimal solution even when data contains >1M irrelevant features.
Recommender system based on feature selection.^{[77]} The feature selection methods are introduced into recommender system research.
^ ^{a}^{b}Zhang, Y.; Wang, S.; Phillips, P. (2014). "Binary PSO with Mutation Operator for Feature Selection using Decision Tree applied to Spam Detection". Knowledge-Based Systems. 64: 22–31. doi:10.1016/j.knosys.2014.03.015.
^Einicke, G. A. (2018). "Maximum-Entropy Rate Selection of Features for Classifying Changes in Knee and Ankle Dynamics During Running". IEEE Journal of Biomedical and Health Informatics. 28 (4): 1097–1103. doi:10.1109/JBHI.2017.2711487. PMID29969403. S2CID49555941.
^Nguyen, H., Franke, K., Petrovic, S. (2010). "Towards a Generic Feature-Selection Measure for Intrusion Detection", In Proc. International Conference on Pattern Recognition (ICPR), Istanbul, Turkey. [2]
^ ^{a}^{b}Nguyen X. Vinh, Jeffrey Chan, Simone Romano and James Bailey, "Effective Global Approaches for Mutual Information based Feature Selection". Proceedings of the 20th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD'14), August 24–27, New York City, 2014. "[3]"
^Senliol, Baris; et al. (2008). "Fast Correlation Based Filter (FCBF) with a different search strategy". 2008 23rd International Symposium on Computer and Information Sciences. pp. 1–4. doi:10.1109/ISCIS.2008.4717949. ISBN978-1-4244-2880-9. S2CID8398495.
^Nguyen, Hai; Franke, Katrin; Petrovic, Slobodan (December 2009). "Optimizing a class of feature selection measures". Proceedings of the NIPS 2009 Workshop on Discrete Optimization in Machine Learning: Submodularity, Sparsity & Polyhedra (DISCML). Vancouver, Canada.
^Shah, S. C.; Kusiak, A. (2004). "Data mining and genetic algorithm based gene/SNP selection". Artificial Intelligence in Medicine. 31 (3): 183–196. doi:10.1016/j.artmed.2004.04.002. PMID15302085.
^Long, N.; Gianola, D.; Weigel, K. A (2011). "Dimension reduction and variable selection for genomic selection: application to predicting milk yield in Holsteins". Journal of Animal Breeding and Genetics. 128 (4): 247–257. doi:10.1111/j.1439-0388.2011.00917.x. PMID21749471.
^Üstünkar, Gürkan; Özöğür-Akyüz, Süreyya; Weber, Gerhard W.; Friedrich, Christoph M.; Aydın Son, Yeşim (2012). "Selection of representative SNP sets for genome-wide association studies: A metaheuristic approach". Optimization Letters. 6 (6): 1207–1218. doi:10.1007/s11590-011-0419-7. S2CID8075318.
^Meiri, R.; Zahavi, J. (2006). "Using simulated annealing to optimize the feature selection problem in marketing applications". European Journal of Operational Research. 171 (3): 842–858. doi:10.1016/j.ejor.2004.09.010.
^Kapetanios, G. (2007). "Variable Selection in Regression Models using Nonstandard Optimisation of Information Criteria". Computational Statistics & Data Analysis. 52 (1): 4–15. doi:10.1016/j.csda.2007.04.006.
^Broadhurst, D.; Goodacre, R.; Jones, A.; Rowland, J. J.; Kell, D. B. (1997). "Genetic algorithms as a method for variable selection in multiple linear regression and partial least squares regression, with applications to pyrolysis mass spectrometry". Analytica Chimica Acta. 348 (1–3): 71–86. doi:10.1016/S0003-2670(97)00065-2.
^Chuang, L.-Y.; Yang, C.-H. (2009). "Tabu search and binary particle swarm optimization for feature selection using microarray data". Journal of Computational Biology. 16 (12): 1689–1703. doi:10.1089/cmb.2007.0211. PMID20047491.
^Hernandez, J. C. H.; Duval, B.; Hao, J.-K. (2007). "A Genetic Embedded Approach for Gene Selection and Classification of Microarray Data". Evolutionary Computation, Machine Learning and Data Mining in Bioinformatics. EvoBIO 2007. Lecture Notes in Computer Science. Vol. 4447. Berlin: Springer Verlag. pp. 90–101. doi:10.1007/978-3-540-71783-6_9. ISBN978-3-540-71782-9.
^Huerta, E. B.; Duval, B.; Hao, J.-K. (2006). "A Hybrid GA/SVM Approach for Gene Selection and Classification of Microarray Data". Applications of Evolutionary Computing. EvoWorkshops 2006. Lecture Notes in Computer Science. Vol. 3907. pp. 34–44. doi:10.1007/11732242_4. ISBN978-3-540-33237-4.
^Muni, D. P.; Pal, N. R.; Das, J. (2006). "Genetic programming for simultaneous feature selection and classifier design". IEEE Transactions on Systems, Man, and Cybernetics - Part B: Cybernetics. 36 (1): 106–117. doi:10.1109/TSMCB.2005.854499. PMID16468570. S2CID2073035.
Liu, Huan; Yu, Lei (2005). "Toward Integrating Feature Selection Algorithms for Classification and Clustering". IEEE Transactions on Knowledge and Data Engineering. 17 (4): 491–502. doi:10.1109/TKDE.2005.66. S2CID1607600.