11email: [email protected]111The source code for the experiments and analyses of this article is publicly available at https://github.com/bommert/adjusted-stability-measures.
Adjusted Measures for Feature Selection Stability for Data Sets with Similar Features
Abstract
For data sets with similar features, for example highly correlated features, most existing stability measures behave in an undesired way: They consider features that are almost identical but have different identifiers as different features. Existing adjusted stability measures, that is, stability measures that take into account the similarities between features, have major theoretical drawbacks. We introduce new adjusted stability measures that overcome these drawbacks. We compare them to each other and to existing stability measures based on both artificial and real sets of selected features. Based on the results, we suggest using one new stability measure that considers highly similar features as exchangeable.
Keywords:
Feature Selection Stability Stability Measures Similar Features Correlated Features1 Introduction
Feature selection is one of the most fundamental problems in data analysis, machine learning, and data mining. Recently, it has drawn increasing attention due to high-dimensional data sets emerging from many different fields. Especially in domains where the chosen features are subject to further experimental research, the stability of the feature selection is very important. Stable feature selection means that the set of selected features is robust with respect to different data sets from the same data generating distribution [7]. If for data sets from the same data generating process, very different sets of features are chosen, this questions not only the reliability of resulting models but could also lead to unnecessary expensive experimental research.
The evaluation of feature selection stability is an active area of research. Overviews of existing stability measures are given in [4] and [9]. The theoretical properties of different stability measures are studied in [10]. An extensive empirical comparison of stability measures is given in [3]. The research that has been done in various aspects related to stability assessment is reviewed in [1].
For data sets with similar features, the evaluation of feature selection stability is more difficult. An example for such data sets are gene expression data sets, where genes of the same biological processes are often highly positively correlated. The commonly used stability measures consider features that are almost identical but have different identifiers as different features. Only little research has been performed concerning the assessment of feature selection stability for data sets with similar features. Stability measures that take into account the similarities between features are defined in [15], [16] and [17]. These measures, however, have major theoretical drawbacks. We call stability measures that consider the similarities between features “adjusted” stability measures.
In this paper, we introduce new adjusted stability measures. On both artificial and real sets of selected features, we compare them to each other and to existing stability measures and analyze their properties. The remainder of this paper is organized as follows: In Section 2, the concept of feature selection stability is explained in detail and adjusted stability measures are defined. The stability measures are compared in Section 3. Section 4 contains a summary of the findings and concluding remarks.
2 Concepts and Methods
In Subsection 2.1, feature selection stability is explained and in Subsection 2.2, measures for quantifying feature selection stability are introduced.
2.1 Feature Selection Stability
The stability of a feature selection algorithm is defined as the robustness of the set of selected features to different data sets from the same data generating distribution [7]. Stability quantifies how different training data sets affect the sets of chosen features. For similar data sets, a stable feature selection algorithm selects similar sets of features. An example for similar data sets could be data coming from different studies measuring the same features, possibly conducted at different places and times, as long as the assumption of the same underlying distribution is valid.
A lack of stability has three main reasons: too few observations, highly similar features and equivalent sets of features. Consider a group of data sets, for which the number of observations does not greatly exceed the number of features, from the same data generating process. The subsets of features with maximal predictive quality on the respective data sets often differ between these data sets. One reason is that there are features that seem beneficial for prediction, but that only help on the specific data set and not on new data from the same process. Selecting such features and including them in a predictive model typically causes over-fitting. Another reason is that there are features with similar predictive quality even though they are unrelated with respect to their content. Due to the small number of observations, chance has a large influence on which of these features has the highest predictive quality on each data set. The instability of feature selection resulting from both reasons is undesirable.
Regarding the case of highly similar and therefore almost identical features, it is likely that for some data sets, one feature is selected and for other data sets from the same process, another one of the similar features is chosen. As the features are almost identical, it makes sense to label this as stable because the feature selection algorithm always chooses a feature with the same information. Therefore, it is desirable to have a stability measure that takes into account the reason for the differences in the sets of chosen features. However, most existing stability measures treat both situations equally: if the identifiers of the chosen features are different, the feature selection is rated unstable.
Regarding the case of equivalent feature sets, for some data sets, there are different sets of features that contain exactly the same information. Finding all equivalent optimal subsets of features is an active field of research, see for example [13], and worst-case intractable. The selection of equivalent subsets of features is evaluated as unstable by all existing stability measures. Creating stability measures that can recognize equivalent sets of features is out of the scope of this paper.
2.2 Adjusted Stability Measures
For the definition of the stability measures, the following notation is used: Assume that there is a data generating process that generates observations of the features . Further, assume that there are data sets that are generated by this process. A feature selection method is applied to all data sets. Let , denote the set of chosen features for the -th data set and the cardinality of this set. The feature selection stability is assessed based on the similarity of the sets . For all stability measures, large values correspond to high stability and small values to low stability.
Many existing stability measures that do not consider similarities between features assess the stability based on the pairwise scores , see for example [3] and [10]. An example for an unadjusted stability measure is
is the expected value of if and features are chosen at random with equal selection probabilities. is an upper bound for . Including it in the denominator makes 1 the maximum value of SMU. If many of the sets and have a large overlap, the feature selection is evaluated as rather stable. The basic idea of adjusted stability measures is to adjust the scores in a way that different but highly similar features count towards stability. Note that all of the following adjusted stability measures depend on a threshold . This threshold indicates how similar features have to be in order to be seen as exchangeable for stability assessment.
Zucknick et al. [17] extend the well known Jaccard index [6], considering the correlations between the features:
is the absolute Pearson correlation between and , is a threshold, and denotes the indicator function for a set . One could generalize this stability measure by allowing arbitrary similarity values from the interval instead of the absolute correlations. A major drawback of this stability measure is that it is not corrected for chance. Correction for chance [10] means that the expected value of the stability measure for a random feature selection with equal selection probabilities for all features does not depend on the number of chosen features.
Zhang et al. [16] also present adjusted stability measures. Their scores are developed for the comparison of two gene lists. The scores they define are
with . is defined as the number of genes that are included in both lists and regulated in the same direction. denotes the number of genes in list that are not in list but significantly positively correlated with at least one gene in list . For each pair of gene lists, two stability scores are obtained.
Yu et al. [15] combine the two scores and into one score for the special case :
In this paper, we generalize this score to be applicable in the general context of feature selection with arbitrary feature sets by
-
1.
replacing the quantity by .
-
2.
allowing the similarities between the features to be assessed by an arbitrary similarity measure instead of only considering significantly positive correlations, that is, replacing by with defined below.
-
3.
replacing , which is the maximum value of , by , the maximum value of .
-
4.
calculating the average of the scores for all pairs , , .
As a result, the stability measure
is obtained. denotes the expected value for a random feature selection and can be assessed in the same way as described below for SMA. Similarity quantifies the similarity of the two features and and is a threshold.
In situations where and greatly differ in size and contain many similar features, the value of SMY may be misleading. Consider a scenario with , , , and . In such situations, there are many features in the larger set that are similar to the same feature in the smaller set. Even though the sets and greatly differ with respect to feature redundancy and resulting effects for model building such as over-fitting, the stability score attains its maximum value.
To overcome this drawback, a new stability measure employing an adjustment different from that fulfills
is defined in this paper. This means that the adjusted score for and cannot exceed the value of that would be obtained if two sets and with and were chosen such that their overlap is maximal. This happens when or . The resulting measure is
with denoting an upper bound for . The expected values cannot be calculated with a universal formula as they depend on the data specific similarity structure. However, they can be estimated by repeating the following Monte-Carlo-procedure times: 1. Randomly draw sets and , with , , and equal selection probabilities for all features. 2. Calculate the score . An estimate for the expected value is the average of the scores.
Concerning the upper bounds , is the tightest upper bound for . However, this upper bound is not a good choice for because the stability measure could attain its maximum value for sets or . To avoid it, must depend on both and . Possible choices are for example or . These choices are upper bounds for and they are met if and only if . For , the bounds differ and holds which makes more suitable. Therefore, is used in this paper. If there are no similar features in the data set, SMA is identical to SMU, independent of the choice of adjustment. Four different adjustments are considered. We first define them and then give explanations for their construction.
determined by Algorithm 1 introduced on page 1 | |||
The resulting four variants of SMA are named SMA-MBM, SMA-Greedy, SMA-Count and SMA-Mean. For the adjustment of SMA-MBM, a graph is constructed. In this graph, each feature of is represented by a vertex. Vertices and are connected by an edge, if and only if similarity. An edge in the graph means that the corresponding features of the two connected vertices should be seen as exchangeable for stability assessment. A matching of a graph is defined as a subset of its edges such that none of the edges share a vertex [12, p. 63]. A maximum matching is a matching that contains as many edges as possible. The size of the maximum matching is the number of edges that are included in the maximum matching. The size of the maximum matching can be interpreted as the maximum number of features in and that should be seen as exchangeable for stability assessment with the restriction that each feature in may only be seen as exchangeable with at most one feature in and vice versa. There are no edges between vertices that both correspond to features of or , so the graph is bipartite [12, p. 17]. For the calculation of a maximum matching for a bipartite graph, there exist specific algorithms [5].
The calculation of the maximum bipartite matching has the complexity [5] and hence can be very time consuming. Therefore, a new greedy algorithm for choosing the most similar pairs of features is introduced in Algorithm 1. It is used to calculate the adjustment in SMA-Greedy. The return value of the algorithm is always smaller than or equal to the size of the maximum bipartite matching of the corresponding graph. The computational complexity of the algorithm is dominated by the sorting of the edges and hence is .
For SMA-Count, is the number of features in , that are not in but that have a similar feature in . The minimum of and is used in order to guarantee that the adjusted score for and cannot exceed the value of that would be obtained if two sets and with and were chosen such that their overlap is maximal. is always larger than or equal to the size of the maximum bipartite matching.
The adjustment of SMA-Mean is very similar to the one of SMA-Count. While counts the number of features in , that have a similar feature in , sums up the mean similarity values of the features in to their similar features in . If there are no similarity values of features in and in the interval , the adjustments of SMA-Count and SMA-Mean are identical. Otherwise, the adjustment of SMA-Mean is smaller than the adjustment of SMA-Count.
3 Experiments and Results
The adjusted stability measures SMZ, SMY, SMA-Count, SMA-Mean, SMA-Greedy and SMA-MBM are compared to each other and to the unadjusted measure SMU. All calculations have been performed with the software R [11] using the package stabm [2] for calculating the stability measures and batchtools [8] for conducting the experiments on a high performance compute cluster.
3.1 Experimental Results on Artificial Feature Sets
First, a comparison in a situation with only 7 features is conducted. The advantage of this comparison is that all possible combinations of 2 subsets of features can be analyzed, as there are only possible combinations. For the adjusted and corrected measures SMY, SMA-Count, SMA-Mean, SMA-Greedy and SMA-MBM, the expected values of the pairwise scores are calculated exactly by considering all possible pairs of sets of the same cardinalities. The values of all stability measures presented in Subsection 2.2 are calculated for all 16 384 possible combinations of 2 feature sets being selected from a total number of 7 features. Figure 1 displays the similarities between the 7 features used for this analysis. The threshold is set to , so there are 3 groups of similar features.
Note that the similarity matrix is sufficient for calculating the stability measure for all pairs of possible combinations of 2 feature sets.
To compare all stability measures, in Figure 2, scatter plots of all pairs of stability measures are shown.
All adjusted measures differ strongly from the unadjusted stability measure SMU with respect to their stability assessment behavior. The adjusted stability measure SMZ, which is the only considered measure that is not corrected for chance, also differs strongly from all other stability measures. This demonstrates, that the missing correction has a large impact on the stability assessment behavior. SMA-Count, SMA-Mean, SMA-Greedy and SMA-MBM have almost identical values for all combinations. The values assigned by SMY and by the SMA variants are also quite similar. However, for combinations that obtain comparably large stability values by all of these measures, SMY often attains larger values than the SMA measures. These are combinations for which several features from the one set are mapped to the same feature of the other set, see the discussion in Subsection 2.2. This undesired behavior of SMY occurs for large stability values. This is problematic because large stability values are what an optimizer is searching for when fitting models in a multi-criteria fashion taking into account the feature selection stability [3].
3.2 Experimental Results on Real Feature Sets
Now, the stability measures are compared based on feature sets that are selected for four real data sets with correlated features (OpenML [14] IDs 851, 41 163, 1 484 and 1 458) with feature selection methods. The details of the feature selections are omitted here due to space constraints. Also, the focus is on the evaluation of the stability based on realistic feature sets resulting from real applications. To assess the similarity between features, the absolute Pearson correlation is employed for all adjusted stability measures. The threshold is set to because in many fields, an absolute correlation of 0.9 or more is interpreted as a “strong” or even “very strong” association. For the adjusted and corrected measures SMY, SMA-Count, SMA-Mean, SMA-Greedy and SMA-MBM, the expected values of the pairwise scores are estimated based on replications. This value for is suggested in [16] and has shown to provide a good compromise between convergence and run time in preliminary studies.
To analyze the similarities between the stability measures, Pearson correlations between all pairs of stability measures are calculated and averaged across data sets by calculating the arithmetic mean. Figure 3
displays the results. The adjusted and uncorrected stability measure SMZ differs most strongly from all other stability measures. The adjusted and corrected measures SMY, SMA-Count, SMA-Mean, SMA-Greedy and SMA-MBM assess the stability almost identically. The corrected and unadjusted measure SMU is more similar to this group than to SMZ. Here, SMU is much more similar to the corrected and adjusted stability measures SMY, SMA-Count, SMA-Mean, SMA-Greedy and SMA-MBM than in the previous subsection. The reason is that the real data sets considered here contain fewer similar features in comparison to the total number of features than in the artificial example in the previous subsection.
Now, the run times of the stability measures for realistic feature sets are compared. For SMU and SMZ, the run time is not an issue. For all of the considered data sets, they can be computed in less than one second. Figure 4
displays the run times for calculating the values of the adjusted and corrected stability measures. The run times of these measures are much longer than the run times of SMU and SMZ. The reason is that the expected values of the scores have to be estimated, which involves frequently repeated evaluation of the adjustments. For all data sets, SMY and SMA-Count require the least time for calculation among the adjusted and corrected measures. For most data sets, the calculation of SMA-Mean, SMA-Greedy and SMA-MBM takes much longer. For large data sets, the latter computation times are not acceptable.
4 Conclusions
For data sets with similar features, for example data sets with highly correlated features, the evaluation of feature selection stability is difficult. The commonly used stability measures consider features that are almost identical but have different identifiers as different features. This, however, is not desired because almost the same information is captured by the respective sets of features.
We have introduced and investigated new stability measures that take into account similarities between features (“adjusted” stability measures). We have compared them to existing stability measures based on both artificial and real sets of selected features. For the existing stability measures, drawbacks were explained and demonstrated.
For the newly proposed adjusted stability measure SMA, four variants were considered: SMA-Count, SMA-Mean, SMA-Greedy and SMA-MBM. They differ in the way they take into account similar features when evaluating the stability. Even though the adjustments for similar features are conceptually different for the four variants, the results are very similar both on artificial and on real sets of selected features. With respect to run time, the variant SMA-Count outperformed the others. Therefore, we conclude that SMA-Count should be used when evaluating the feature selection stability for data sets with similar features.
A promising future strategy is to employ SMA-Count when searching for models with high predictive accuracy, a small number of chosen features and a stable feature selection for data sets with similar features. To reach this goal, one can perform multi-criteria hyperparameter tuning with respect to the three criteria and assess the stability with SMA-Count.
Acknowledgements
This work was supported by German Research Foundation (DFG), Project RA 870/7-1 and Collaborative Research Center SFB 876, A3. We acknowledge the computing time provided on the Linux HPC cluster at TU Dortmund University (LiDO3), partially funded in the course of the Large-Scale Equipment Initiative by the German Research Foundation (DFG) as Project 271512359.
References
- [1] Awada, W., Khoshgoftaar, T.M., Dittman, D., Wald, R., Napolitano, A.: A review of the stability of feature selection techniques for bioinformatics data. In: 2012 IEEE International Conference on Information Reuse and Integration. pp. 356–363 (2012)
- [2] Bommert, A.: stabm: Stability Measures for Feature Selection (2019), https://CRAN.R-project.org/package=stabm, R package version 1.1.0
- [3] Bommert, A., Rahnenführer, J., Lang, M.: A multicriteria approach to find predictive and sparse models with stable feature selection for high-dimensional data. Computational and Mathematical Methods in Medicine 2017, 7907163 (2017)
- [4] He, Z., Yu, W.: Stable feature selection for biomarker discovery. Computational Biology and Chemistry 34(4), 215–225 (2010)
- [5] Hopcroft, J.E., Karp, R.M.: An algorithm for maximum matchings in bipartite graphs. SIAM Journal on Computing 2(4), 225–231 (1973)
- [6] Jaccard, P.: Étude comparative de la distribution florale dans une portion des Alpes et du Jura. Bulletin de la Société Vaudoise des Sciences Naturelles 37, 547–579 (1901)
- [7] Kalousis, A., Prados, J., Hilario, M.: Stability of feature selection algorithms: A study on high-dimensional spaces. Knowledge and Information Systems 12(1), 95–116 (2007)
- [8] Lang, M., Bischl, B., Surmann, D.: batchtools: Tools for R to work on batch systems. Journal of Open Source Software 2(10) (2017)
- [9] Lausser, L., Müssel, C., Maucher, M., Kestler, H.A.: Measuring and visualizing the stability of biomarker selection techniques. Computational Statistics 28(1), 51–65 (2013)
- [10] Nogueira, S.: Quantifying the Stability of Feature Selection. Ph.D. thesis, University of Manchester, United Kingdom (2018)
- [11] R Core Team: R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria (2018), https://www.R-project.org/
- [12] Rahman, M.S.: Basic Graph Theory. Springer, New York, USA (2017)
- [13] Statnikov, A., Lytkin, N.I., Lemeire, J., Aliferis, C.F.: Algorithms for discovery of multiple markov boundaries. Journal of Machine Learning Research 14, 499–566 (2013)
- [14] Vanschoren, J., Van Rijn, J.N., Bischl, B., Torgo, L.: OpenML: Networked science in machine learning. ACM SIGKDD Explorations Newsletter 15(2), 49–60 (2013)
- [15] Yu, L., Han, Y., Berens, M.E.: Stable gene selection from microarray data via sample weighting. IEEE/ACM Transactions on Computational Biology and Bioinformatics 9(1), 262–272 (2012)
- [16] Zhang, M., Zhang, L., Zou, J., Yao, C., Xiao, H., Liu, Q., Wang, J., Wang, D., Wang, C., Guo, Z.: Evaluating reproducibility of differential expression discoveries in microarray studies by considering correlated molecular changes. Bioinformatics 25(13), 1662–1668 (2009)
- [17] Zucknick, M., Richardson, S., Stronach, E.A.: Comparing the characteristics of gene expression profiles derived by univariate and multivariate classification methods. Statistical Applications in Genetics and Molecular Biology 7(1), 7 (2008)