Abstract
Missing data is a pervasive challenge in data science, often requiring imputation before machine learning models can be applied. This paper benchmarks seven imputation methods—ranging from simple mean substitution to complex multivariate techniques—across 13 real-world datasets and five popular machine learning algorithms. Our findings reveal that there is no universal "best" imputation method; rather, performance is highly sensitive to the choice of the downstream predictive model and the evaluation metric. Surprisingly, simple methods like mean substitution and k-Nearest Neighbors often provide competitive or superior results compared to more computationally intensive alternatives.
Introduction
The handling of missing values is a mandatory preprocessing step for most machine learning workflows. While modern implementations like XGBoost can handle missingness natively, the vast majority of classic algorithms require complete data. Data scientists typically choose between "quick and dirty" fixes, such as mean or mode substitution, and sophisticated statistical frameworks like Multiple Imputation by Chained Equations (MICE).
Despite the prevalence of these techniques, empirical evidence regarding their impact on final predictive performance—rather than just their ability to recover missing values—has been limited. This study addresses this gap by systematically evaluating how different imputation strategies influence the AUC and F1 scores of various classification models.
Methodology
The researchers conducted a large-scale benchmark crossing seven imputation techniques with five machine learning algorithms.
Imputation Methods
The methods were categorized into three groups:
- Ad-hoc: Random substitution and Mean/Mode substitution.
- Single Imputation:
softImpute(low-rank matrix approximation),missForest(iterative random forests),VIM kknn(k-Nearest Neighbors), andVIM hotdeck. - Multiple Imputation:
mice(using predictive mean matching).
Machine Learning Algorithms
The predictive models included Logistic Regression (glmnet), Classification Trees (rpart), Random Forest (ranger), k-Nearest Neighbors (kknn), and Gradient Boosting (xgboost). To standardize results across 13 diverse datasets from the OpenML100 collection (e.g., adult, sick, credit-approval), the authors employed a ranking system (1 to 7), where a rank of 1 was assigned to the method yielding the best performance for a specific model-dataset pair.
Key Insights and Ideas
The benchmark results highlight several critical nuances in the relationship between imputation and prediction.
No Universal Winner and Metric Sensitivity
The data confirms that no single imputation method consistently outperforms others across all scenarios. The "best" choice is contingent upon the specific machine learning algorithm used and the evaluation metric. For instance, if the primary goal is maximizing AUC, VIM kknn (k-Nearest Neighbors imputation) proved to be the most reliable choice. Conversely, for the F1 metric, simple mean substitution frequently emerged as the top performer, particularly when paired with Logistic Regression or k-NN.
Model-Imputation Synergy
Certain pairings exhibit strong synergy. For instance, the complex mice method pairs exceptionally well with ensemble models like Random Forest (ranger) and XGBoost. In these cases, the statistical sophistication of mice provides a measurable performance boost over simpler methods like random substitution.
As shown in the cumulative analysis above, a "greedy" selection of just three methods—random, missForest, and hotdeck—can achieve optimal results for over 75% of the tasks studied when optimizing for F1. This suggests that practitioners can often achieve near-peak performance by testing a small subset of diverse imputation strategies rather than exhaustive searching.
Key Results
The average ranks across different models provide a clear picture of method performance. Mean substitution maintained the best average rank for F1 scores in two out of five models (glmnet and kknn).
Specific model preferences were also noted in the data: missForest performed best for Decision Trees (rpart), while VIM hotdeck achieved the best average rank for XGBoost. A Principal Component Analysis (PCA) of these rankings further revealed that while mean, missForest, and VIM kknn share similar performance profiles, mice behaves distinctly, favoring ensemble architectures.
Limitations and Future Work
While comprehensive, this study has limitations. Imputation was performed on training and test sets separately due to technical constraints; in a production pipeline, the imputation model should be fit on training data only to avoid data leakage. Additionally, the study used default hyperparameters; tuning both imputation and ML models might alter the rankings. Future research could focus on developing meta-learning models that analyze dataset characteristics to automatically recommend the most effective imputation strategy for a given predictive task.
Summary updated