
The effect of sparse data problem on classification algorithms in machine learning: A case study on early-stage diabetes risk prediction
Abstract
Background and Objective/s: Machine learning (ML) is increasingly applied in healthcare to support early diagnosis of chronic diseases such as diabetes mellitus. However, its performance under sparse data conditions—where values are missing or incomplete—remains insufficiently understood, despite such conditions being common in patient-reported outcomes and non-clinical assessments. This study evaluates the performance of four supervised classification algorithms—Random Forest (RF), Decision Tree (DT), Support Vector Machine (SVM), and Naive Bayes (NB)—in predicting early-stage diabetes risk from a sparse dataset obtained through self-reported questionnaires.
Methods: A comparative experimental design assessed classifiers on a healthcare dataset of 677 records from individuals at risk of early-stage diabetes mellitus, collected from diabetic clinics and outpatient departments at Teaching Hospital, Jaffna. Data sparsity (10–40%) was introduced synthetically at controlled levels using a zero-placeholder encoding strategy to model patient perceptual uncertainty, while preserving core clinical features. Hyperparameter tuning was performed using randomized search with stratified 10-fold cross-validation. Performance was evaluated using accuracy, precision, recall, F1-score, sensitivity, specificity, and ROC–AUC, with statistical significance testing (paired t-test, Wilcoxon signed-rank test, Friedman test) to validate comparative findings. Memory efficiency was assessed by comparing standard and sparse matrix storage formats.
Results: RF demonstrated superior robustness across all sparsity levels, maintaining accuracy above 0.87 and AUC above 0.91 up to 40% sparsity. DT showed moderate resilience (AUC: 0.85 at 40% sparsity), while SVM and NB proved highly sensitive to increasing uncertainty, with AUC declining to 0.62 and 0.55 respectively at 40% sparsity. Statistical significance testing confirmed that performance differences between RF and other classifiers were significant (p < 0.05) with large effect sizes (Cohen's d > 0.8). Sparse matrix formats reduced memory usage by approximately 62% without compromising predictive accuracy.
Conclusions/Recommendations: RF emerged as the most reliable model for early-stage diabetes risk prediction under conditions of patient perceptual uncertainty, demonstrating that ensemble-based methods can accommodate subjective ambiguity inherent in self-reported symptom data. The zero-placeholder encoding strategy offers a transparent and interpretable approach to representing uncertainty in ordinal clinical variables. While external validation is required, these findings provide a proof-of-concept that sparsity-aware ML models can support scalable digital health screening, particularly when conventional diagnostic techniques are unavailable. Integrating such approaches with uncertainty-aware preprocessing may enhance early detection and facilitate personalized healthcare delivery.
© 2026 Thevaka Satheeskumar, Sampath Deegalla, Thirusittampalam Ketheesan, published by Postgraduate Institute of Medicine University of Colombo
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 License.