We developed a machine learning algorithm that predicts risk for decreased sensor glucose time in range (TIR) following a clinic appointment, using primarily clinic-uploaded device data.
We selected 3175 PWD using pump+CGM who had 7079 clinic upload events of pump data to Glooko between 1/19/2018-6/28/2019. We trained a random forest-based algorithm to predict risk for a 10% decrease in TIR within any 14-day window in the next 30 days, relative to the average TIR 30 days pre-appointment.
We built features from insulin usage trends over the 30-90 days pre-appointment: means and standard deviations of values and counts for boluses (extended, manual, normal, without carbs, with override, with correction), basals (scheduled, suspend, temporary increase and decrease), and carbohydrate amounts. We also included average CGM active time, diabetes type, and gender.
The training cohort had median age=24 years (IQR:12-43), 56.3% female, 80.9% type 1 diabetes (T1D), average blood glucose median=168.3mg/dL (IQR:147-191.2). We performed out-of-sample validation using 680 individuals (1516 clinic upload events). The validation cohort had median age=23 years (IQR:11-42), 55.5% female, 78.9% T1D, average blood glucose median=168.6mg/dL (IQR:147.4-190.7). The algorithm predicted individuals at risk of decreased TIR with a precision of 0.76 and a recall of 0.64. This correlates to sensitivity=64%, specificity=75%, and positive predictive value=76%.
The present model indicates that it is feasible to predict future deterioration in glycemic control at clinic visits with limited data; additional datapoints may improve predictions. Predicting worsening glycemic control via machine learning may help clinicians identify their most at-risk patients for more intensive intervention.