Enhanced Out-of-Fold Stacking with Feature Grouping and Model-Specific Transformations for Diabetes Prediction Improvement
Main Article Content
Abstract
Diabetes mellitus is a chronic disease with serious implications for global health. Early detection is essential to reduce these risks, and machine learning methods are widely used in diabetes prediction. However, improving accuracy remains a major challenge in the development of predictive models. This study proposes a stacking-based ensemble learning approach with an out-of-fold (OOF) scheme to improve classification performance. The proposed method consists of several systematic steps, namely (1) data preprocessing via median imputation of invalid values and feature transformation according to model characteristics, (2) the creation of base learners comprising Logistic Regression, Gaussian Naïve Bayes, Support Vector Machine, Random Forest, and XGBoost, (3) model training using Stratified Cross Validation 5 Fold to generate OOF predictions, (4) combining all OOF predictions into a meta-feature matrix, and (5) training an XGBoost-based meta-model to generate the final prediction. This approach enables the meta-model to optimally learn the relationships among the outputs of the baseline models. Experimental results show that the proposed method achieves an accuracy of 91.15%, precision of 90.65%, recall of 83.21%, and an F1-score of 86.77%. These results indicate that stacking is effective in improving the accuracy of diabetes predictions.
Article Details

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
References
C. Xu, F. Shi, W. Ding, C. Fang, and C. Fang, “Development and validation of a machine learning model for cardiovascular disease risk prediction in type 2 diabetes patients,” Sci. Rep., vol. 15, no. 1, Dec. 2025, doi: 10.1038/s41598-025-18443-7.
M. Y. Shams, Z. Tarek, and A. M. Elshewey, “A novel RFE-GRU model for diabetes classification using PIMA Indian dataset,” Sci. Rep., vol. 15, no. 1, Dec. 2025, doi: 10.1038/s41598-024-82420-9.
J. Zhao, H. Gao, C. Yang, T. An, Z. Kuang, and L. Shi, “Attention-Oriented CNN Method for Type 2 Diabetes Prediction,” Applied Sciences (Switzerland), vol. 14, no. 10, May 2024, doi: 10.3390/app14103989.
J. Zhao, H. Gao, C. Yang, T. An, Z. Kuang, and L. Shi, “Attention-Oriented CNN Method for Type 2 Diabetes Prediction,” Applied Sciences (Switzerland), vol. 14, no. 10, May 2024, doi: 10.3390/app14103989.
V. Chang, J. Bailey, Q. A. Xu, and Z. Sun, “Pima Indians diabetes mellitus classification based on machine learning (ML) algorithms,” Neural Comput. Appl., vol. 35, no. 22, pp. 16157–16173, Aug. 2023, doi: 10.1007/s00521-022-07049-z.
M. Bhattacharya and D. Datta, “Intelligent Models for Diabetic Prediction Using Conventional Machine Learning Techniques and Ensemble Learning Algorithms,” SN Comput. Sci., vol. 6, no. 1, Jan. 2025, doi: 10.1007/s42979-024-03479-9.
S. Shafi and G. A. Ansari, “Heart Disease Prediction Using Machine Learning with Metaheuristic Feature Selection Approaches,” Biomedical Materials and Devices, 2025, doi: 10.1007/s44174-025-00507-x.
Y. Yuan, J. Wei, H. Huang, W. Jiao, J. Wang, and H. Chen, “Review of resampling techniques for the treatment of imbalanced industrial data classification in equipment condition monitoring,” Nov. 01, 2023, Elsevier Ltd. doi: 10.1016/j.engappai.2023.106911.
Q. A. Hidayaturrohman and E. Hanada, “Impact of Data Pre-Processing Techniques on XGBoost Model Performance for Predicting All-Cause Readmission and Mortality Among Patients with Heart Failure,” BioMedInformatics, vol. 4, no. 4, pp. 2201–2212, Dec. 2024, doi: 10.3390/biomedinformatics4040118.
S. Siraj, F. H. Dahri, J. A. Chandio, A. H. Jalbani, and A. A. Laghari, “Comparison of machine learning techniques to predict students’ CGPA by using course learning outcomes datasets,” Human-Intelligent Systems Integration, Apr. 2025, doi: 10.1007/s42454-025-00063-1.
I. P. Nguemkam Tebou, N. Tsopze, and D. Tchuente, “Hybrid Method to Explain Predictions of Stacking Ensemble Model,” Information Systems Frontiers, Feb. 2026, doi: 10.1007/s10796-025-10684-1.
S. Shafieian and M. Zulkernine, “Multi-layer stacking ensemble learners for low footprint network intrusion detection,” Complex and Intelligent Systems, vol. 9, no. 4, pp. 3787–3799, Aug. 2023, doi: 10.1007/s40747-022-00809-3.
M. A. Muslim et al., “New model combination meta-learner to improve accuracy prediction P2P lending with stacking ensemble learning,” Intelligent Systems with Applications, vol. 18, May 2023, doi: 10.1016/j.iswa.2023.200204.
M. Sagming, R. Heymann, and M. V. Visaya, “Using topological data analysis and machine learning to predict customer churn,” J. Big Data, vol. 11, no. 1, Dec. 2024, doi: 10.1186/s40537-024-01020-6.
E. Alsharif and M. Alharby, “An Ensemble Machine Learning Approach for Detecting and Classifying Malware Attacks on Mobile Devices,” Arab. J. Sci. Eng., vol. 50, no. 19, pp. 15825–15841, Oct. 2025, doi: 10.1007/s13369-025-10011-5.
C. T. Doan and H. Du Nguyen, “Robust water quality prediction across multiple indicator formulations using an explainable ensemble learning model,” Water Resour. Ind., vol. 34, Dec. 2025, doi: 10.1016/j.wri.2025.100329.
D. A. Debal and T. M. Sitote, “Chronic kidney disease prediction using machine learning techniques,” J. Big Data, vol. 9, no. 1, Dec. 2022, doi: 10.1186/s40537-022-00657-5.
K. Kevin, M. Enjeli, and A. Wijaya, “Analisis Sentimen Pengunaaan Aplikasi Kinemaster Menggunakan Metode Naive Bayes,” Jurnal Ilmiah Computer Science, vol. 2, no. 2, pp. 89–98, Jan. 2024, doi: 10.58602/jics.v2i2.24.
B. Chao and H. Guangqiu, “Innovative SVM optimization with differential gravitational fireworks for superior air pollution classification,” Sci. Rep., vol. 14, no. 1, Dec. 2024, doi: 10.1038/s41598-024-75839-7.
S. Singh, M. Kumar, B. K. Verma, and S. Kumar, “Optimizing Air Pollution Prediction With Random Forest Algorithm,” Aerosol Science and Engineering, 2025, doi: 10.1007/s41810-025-00292-6.
M. A. Muslim and Y. Dasril, “Company bankruptcy prediction framework based on the most influential features using XGBoost and stacking ensemble learning,” International Journal of Electrical and Computer Engineering (IJECE), vol. 11, no. 6, p. 5549, Dec. 2021, doi: 10.11591/ijece.v11i6.pp5549-5557.
J. Sadaiyandi, P. Arumugam, A. K. Sangaiah, and C. Zhang, “Stratified Sampling-Based Deep Learning Approach to Increase Prediction Accuracy of Unbalanced Dataset,” Electronics (Basel)., vol. 12, no. 21, p. 4423, Oct. 2023, doi: 10.3390/electronics12214423.
P. M. Vieira and F. Rodrigues, “An automated approach for binary classification on imbalanced data,” Knowl. Inf. Syst., vol. 66, no. 5, pp. 2747–2767, May 2024, doi: 10.1007/s10115-023-02046-7.
A. Masood, M. Niazkar, M. Zakwan, and R. Piraei, “A Machine Learning-Based Framework for Water Quality Index Estimation in the Southern Bug River,” Water (Switzerland), vol. 15, no. 20, Oct. 2023, doi: 10.3390/w15203543.
H. Ahmad, B. Kasasbeh, B. Aldabaybah, and E. Rawashdeh, “Class balancing framework for credit card fraud detection based on clustering and similarity-based selection (SBS),” International Journal of Information Technology (Singapore), vol. 15, no. 1, pp. 325–333, Jan. 2023, doi: 10.1007/s41870-022-00987-w.