Manara - Qatar Research Repository
PIIS0168822720306410.pdf (1.59 MB)

Artificial Intelligence (AI) based machine learning models predict glucose variability and hypoglycaemia risk in patients with type 2 diabetes on a multiple drug regimen who fast during ramadan (The PROFAST – IT Ramadan study)

Download (1.59 MB)
journal contribution
submitted on 2023-10-08, 11:13 and posted on 2023-10-08, 12:29 authored by Tarik Elhadd, Raghvendra Mall, Mohammed Bashir, Joao Palotti, Luis Fernandez-Luque, Faisal Farooq, Dabia Al Mohanadi, Zainab Dabbous, Rayaz A. Malik, Abdul Badi Abou-Samra


To develop a machine-based algorithm from clinical and demographic data, physical activity and glucose variability to predict hyperglycaemic and hypoglycaemic excursions in patients with type 2 diabetes on multiple glucose lowering therapies who fast during Ramadan.

Patients and methods

Thirteen patients (10 males and three females) with type 2 diabetes on 3 or more anti-diabetic medications were studied with a Fitbit-2 pedometer device and Freestyle Libre (Abbott Diagnostics) 2 weeks before and 2 weeks during Ramadan. Several machine learning techniques were trained to predict blood glucose levels in a regression framework utilising physical activity and contemporaneous blood glucose levels, comparing Ramadan to non-Ramadan days.


The median age of participants was 51 years (IQR 49–52); median BMI was 33.2 kg/m2 (IQR 33.0–35.9) and median HbA1c was 7.3% (IQR 6.7–7.8). The optimal model using physical activity achieved an R2 of 0.548 and a mean absolute error (MAE) of 30.30. The addition of electronic health record (ehr) information increased R2 to 0.636 and reduced MAE to 26.89 and the time of the day feature further increased R2 to 0.768 and reduced MAE to 20.55. Combining all the features together resulted in an optimal XGBoost model with an R2 of 0.836 and MAE of 17.47. This model accurately estimated normal glucose levels in 2584/2715 (95.2%) readings and hyperglycaemic events in 852/1031 (82.6%) readings, but fewer hypoglycaemic events (48/172 (27.9%)). The optimal XGBoost model prioritized age, gender, BMI and HbA1c followed by glucose levels and physical activity. Interestingly, the blood glucose level prediction by our model was influenced by use of SGLT2i.


XGBoost, a machine learning AI algorithm achieves high predictive performance for normal and hyperglycaemic excursions, but has limited predictive value for hypoglycaemia in patients on multiple therapies who fast during Ramadan.

Other Information

Published in: Diabetes Research and Clinical Practice
See article on publisher's website:


Open Access funding provided by the Qatar National Library.

Ministry of Public Health Qatar, Medical Research Council ( #16743).



  • English



Publication Year

  • 2020

License statement

This Item is licensed under the Creative Commons Attribution 4.0 International License.

Institution affiliated with

  • Hamad Medical Corporation
  • Academic Health System - HMC
  • Qatar Metabolic Institute - HMC
  • Hamad Bin Khalifa University
  • Qatar Computing Research Institute - HBKU
  • Weill Cornell Medicine - Qatar