A Comparative Analysis of Machine Learning Models for Predicting Glycemic Control Status of Type 2 Diabetes Using a Nationwide Study: The Diacare Survey
Ali Sharifi, Azin Soltani, Saba M. Birjandi, Narges Z. Balajam, Seyed M. K. Aghamir, Ramin Heshmat, Gita ShafieeAbstract
Background:
Diabetes is a global health challenge, and achieving glycemic control is critical to preventing complications. However, machine learning (ML) offers promising tools for predicting control status; comparative performance of different models using multifaceted control definitions remains underexplored. This study aimed to evaluate and compare the performance of six machine learning models in predicting glycemic control status among a large sample of diabetic patients in Iran.
Methods:
We conducted a cross-sectional analysis of data from the nationwide DiaCare study collected between 2018 and 2020. Two definitions of glycemic control status include: controlled HbA1c (≤7%) and controlled triple target (HbA1c <7%, blood pressure <130/80 mmHg, and LDL-c <100 mg/dL or <70 mg/dL with cardiovascular disease (CVD history). In order to address class imbalance, we applied random under-sampling. ML models follow logistic regression, naive Bayes, random forest, XGBoost, decision tree, and neural network were trained and evaluated using 75% of the data, and their performance was validated on the remaining 25%. Model performance was assessed using sensitivity, specificity, accuracy, recall, and area under the curve (AUC) for three feature sets: full, selected, and equal features across all models.
Results:
Among 13,321 participants, 2814 (21.9%) had glycemic control based on HbA1c, and in terms of achieving the triple target, 613 (4.7%) were classified as controlled. The predictive performance varied significantly based on the control definition and feature set. For HbA1c control, logistic regression and random forest performed best with the full feature set (AUC = 0.63). For the controlled triple target, random forest demonstrated superior performance with both full and selected features (AUC = 0.90 and 0.91, respectively). Using a common set of features, logistic regression, naive Bayes, and neural networks performed similarly for controlled HbA1c (AUC = 0.61), while the decision tree was most effective for the controlled triple target (AUC = 0.80).
Conclusions:
Machine learning models, particularly random forest, can effectively predict the achievement of a multifactorial diabetes control target. Feature selection is a crucial step, as it can meaningfully enhance predictive accuracy. These data-driven models could serve as valuable tools for risk stratification and personalized management in diabetes care.