Comparison of Diabetes Risk Prediction Models: A Comparative Analysis of Logistic Regression, Random Forests, and Decision Trees
Abstract
Diabetes is a growing global public health concern, projected to affect over 700 million people by 2045. Accurate risk prediction models are essential for early detection and prevention. This study compares three machine learning models—logistic regression, random forest, and decision tree—using a large-scale health survey dataset from Kaggle. To ensure model robustness, stratified sampling and class balancing were applied, and 14 significant predictors (e.g., body mass index, age, hypertension) were identified using least absolute shrinkage and selection operator (LASSO) regression. Model performance was evaluated using accuracy, recall, F1-score (harmonic mean of precision and recall), and receiver operating characteristic–area under the curve (ROC–AUC). Logistic regression achieved the best balance of accuracy (74%), interpretability, and generalization. Random forest captured complex nonlinear patterns but showed signs of overfitting. Decision trees were less stable and less accurate. Findings reveal key trade-offs in complexity versus interpretability in population-level diabetes risk modeling.
References
- International Diabetes Federation. (n.d.). IDF Global Diabetes Overview 8th Edition. https: //diabetesatlas.org/upload/resources/previous/files/8/IDF_DA_8e-ZH-final.pdf
- Li, R., & Li, D. (2025). A review of the impact of multiple risk factors on individualized management of diabetes mellitus. Advances in Clinical Medicine, 15(11), 170.
- Li, Y., Wang, F., & Zhang, W. (2020). Meta-analysis of factors influencing the prevalence of diabetes mellitus in the Chinese population. China Public Health, 36(9), 1378–1384.
- Ning, G., Wang, W. Q., & Li, G. W. (2024). Diabetes mellitus in China 1: Epidemiology and risk factors. Translational Medicine.
- Wang, L., Zhang, M., & Li, N. (2023). Risk factor analysis of type 2 diabetes mellitus based on LASSO regression and random forest algorithm. Journal of Environment and Health, 40(7), 613–618.
- Li, J. S. (2023). Machine learning-based diabetes prediction and SHAP characterization [Master’s thesis, Shanghai University of Engineering and Technology].
- Zhang, H., Liu, Y., & Wang, Q. (2020). Analysis of risk factors for insulin antibody production in patients with type 2 diabetes mellitus. Advances in Clinical Medicine, 10(5), 361–367.
- Wang, M., Li, N., & Zhang, W. (2018). Progress in epidemiologic research on psychosocial risk factors for the development of diabetes mellitus. Chinese Journal of Epidemiology, 39(10), 1343–1347.
- Dong, J., Xue, Q., Teng, F., et al. (2024). Progress in the study of diabetes risk factors after transplantation. Organ Transplantation, 15(1), 19–24.
- Teboul, A. (2022). Diabetes Health Indicators Dataset. https: //www.kaggle.com/datasets/alexteboul/diabetes-health-indicators-dataset
- Centers for Disease Control and Prevention. (n.d.). Behavioral Risk Factor Surveillance System (BRFSS). https: //www.cdc.gov/brfss/
- Dong, X., Zhao, D., Li, X. (2022). Effects of family history, sleep, and psychological factors on diabetes prevalence: Based on 2018 China Chronic Disease Surveillance Data. Chinese Journal of Prevention and Control of Chronic Diseases, 30(5), 366–370.