International Journal of Research and Development in Engineering Sciences
Open Access publication.
Closed-Form Characterization of Selection Bias in Cross-Validation for Feature-Selected Predictive Models using Machine Learning
Abstract
Choosing the most promising features on all the data and then cross-validating a classifier on them is a well-known mistake, but its size is usually shown by example, not predicted. We derive the expected accuracy reported by such leaky cross-validation when the features are pure noise. The selected features have effect sizes given by order statistics of |N(0, 1)|, which gives an explicit formula for the reported accuracy in terms of the sample size n, the number of features p, the number k kept and the number of folds K, and a closed form for the sample size at which the optimism falls below a chosen level. Across 27 simulated settings the formula was within 0.025 of the simulated value (mean error 0.007), while the simpler re substitution formula erred by up to 0.095. With 100 cases, 1,000 noise features and 5 kept, leaky cross-validation reported 74% accuracy for a classifier with true accuracy 50%; selection inside each fold reported 49%. Optimism fell as 1/?n: bringing it below 5 points needed about 2,476 cases for 5 features of 1,000. With ten weak informative features among 10,000 and 50 cases, leaky cross-validation reported 98% against a true 52%. On the breast cancer and digits datasets, leakage was harmless when the signal was strong, but with permuted labels and 1,000 added noise features leaky cross-validation reported 80% and 81% against a true 50%. The price of the honest procedure is variance: with 50 cases the standard deviation of nested estimates was 4.6 times that of the leaky ones. Synthetic results are simulations; the real data are two small benchmark sets with added noise.
Keywords: Cross-Validation, Feature Selection, Selection Bias, Optimism, Nested Cross-Validation, Order Statistics
How to cite this article
CrossRef DOI: https://doi.org/10.63328/ijrdes-v8ri6p5