Abstract
BACKGROUND AND OBJECTIVE: The aim of this study was to develop and validate explainable prediction models based on continuous glucose monitoring (CGM) and baseline data to identify a week-to-week risk of CGM key metrics (hyperglycemia, hypoglycemia, glycemic variability). By having a weekly prediction of CGM key metrics, it is possible for the patient or health care personnel to take immediate preemptive action. METHODS: We analyzed, trained, and internally tested three prediction models (Logistic regression, XGBoost, and TabNet) using CGM data from 187 type 1 diabetes patients with long-term CGM monitoring. A binary classification approach combined with feature engineering deployed on the CGM signals was used to predict hyperglycemia, hypoglycemia, and glycemic variability based on consensus targets (time above range ≥5%, time below range ≥4%, coefficient of variation ≥36%). The models were validated in two independent cohorts with a total of 223 additional patients of varying ages. RESULTS: A total of 46 593 weeks of CGM data were included in the analysis. For the best model (XGBoost), the area under the receiver operating characteristic curve (ROC-AUC) was 0.9 [95% confidence interval (CI) = 0.89-0.91], 0.89 [95% CI = 0.88-0.9], and 0.8 [95% CI = 0.79-0.81] for predicting hyperglycemia, hypoglycemia, and glycemic variability in the interval validation, respectively. The validation test showed good generalizability of the models with ROC-AUC of 0.88 to 0.95, 0.84 to 0.89, and 0.80 to 0.82 for predicting the glycemic outcomes. CONCLUSION: Prediction models based on real-world CGM data can be used to predict the risk of unstable glycemic control in the forthcoming week. The models showed good performance in both internal and external validation cohorts.