Predicting poor glycemic control during Ramadan among non-fasting patients with diabetes using artificial intelligence based machine learning models

Diabetes Res Clin Pract. 2022 Aug;190:109982. doi: 10.1016/j.diabres.2022.109982. Epub 2022 Jul 6.


Aims: This study aims to predict poor glycemic control during Ramadan among non-fasting patients with diabetes using machine learning models.

Methods: First, we conducted three consultations, before, during, and after Ramadan to assess demographics, diabetes history, caloric intake, anthropometric and metabolic parameters. Second, machine learning techniques (Logistic Regression, Support Vector Machine, Naive Bayes, K-nearest neighbor, Decision Tree, Random Forest, Extra Trees Classifier and Catboost) were trained using the data to predict poor glycemic control among patients. Then, we conducted several simulations with the best performing machine learning model using variables that were found as main predictors of poor glycemic control.

Results: The prevalence of poor glycemic control among patients was 52.6%. Extra tree Classifier was the best performing model for glycemic deterioration (accuracy = 0.87, AUC = 0,87). Caloric intake evolution, gender, baseline caloric intake, baseline weight, BMI variation, waist circumference evolution and Total Cholesterol serum level after Ramadan were selected as the most significant for the prediction of poor glycemic control. We determined thresholds for each predicting factor among which this risk is present.

Conclusions: The clinical use of our findings may help to improve glycemic control during Ramadan among patients who do not fast by targeting risk factors of poor glycemic control.

Keywords: Artificial intelligence; Diabetes; Glycemic control; Machine learning; Ramadan.

MeSH terms

  • Artificial Intelligence*
  • Bayes Theorem
  • Diabetes Mellitus, Type 2*
  • Glycated Hemoglobin / analysis
  • Glycemic Control
  • Humans
  • Machine Learning


  • Glycated Hemoglobin A