Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Jul;15(4):842-855.
doi: 10.1177/1932296820922622. Epub 2020 Jun 1.

Feature-Based Machine Learning Model for Real-Time Hypoglycemia Prediction

Affiliations

Feature-Based Machine Learning Model for Real-Time Hypoglycemia Prediction

Darpit Dave et al. J Diabetes Sci Technol. 2021 Jul.

Erratum in

Abstract

Background: Hypoglycemia is a serious health concern in youth with type 1 diabetes (T1D). Real-time data from continuous glucose monitoring (CGM) can be used to predict hypoglycemic risk, allowing patients to take timely intervention measures.

Methods: A machine learning model is developed for probabilistic prediction of hypoglycemia (<70 mg/dL) in 30- and 60-minute time horizons based on CGM datasets obtained from 112 patients over a range of 90 days consisting of over 1.6 million CGM values under normal living conditions. A comprehensive set of features relevant for hypoglycemia are developed and a parsimonious subset with most influence on predicting hypoglycemic risk is identified. Model performance is evaluated both with and without contextual information on insulin and carbohydrate intake.

Results: The model predicted hypoglycemia with >91% sensitivity for 30- and 60-minute prediction horizons while maintaining specificity >90%. Inclusion of insulin and carbohydrate data yielded performance improvement for 60-minute but not for 30-minute predictions. Model performance was highest for nocturnal hypoglycemia (~95% sensitivity). Shortterm (less than one hour) and medium-term (one to four hours) features for good prediction performance are identified.

Conclusions: Innovative feature identification facilitated high performance for hypoglycemia risk prediction in pediatric youth with T1D. Timely alerts of impending hypoglycemia may enable proactive measures to avoid severe hypoglycemia and achieve optimal glycemic control. The model will be deployed on a patient-facing smartphone application in an upcoming pilot study.

Keywords: carbohydrate intake; continuous glucose monitoring; feature extraction; hypoglycemia prediction; insulin pump data; machine learning.

PubMed Disclaimer

Conflict of interest statement

Declaration of Conflicting Interests: The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article. TAMU and BCM have applied for provisional patent of this technology.

Figures

Figure 1.
Figure 1.
Boxplot of CGM variations by hour for a sample patient. The boxplot gives the median and quartiles of glucose values for each hour of the day for a sample patient. It can be observed that the glucose pattern varies significantly throughout a day. CGM, continuous glucose monitoring.
Figure 2.
Figure 2.
Insulin on board over time for different insulin boluses. The amount of bolus insulin injected is absorbed within a period of four hours. I1, I2, I3, and I4 are different dosages of bolus insulin. The figure shows different rates of insulin absorption for different boluses.
Figure 3.
Figure 3.
Variable importance plot for random forests. The variables are arranged in decreasing order of importance for classification of the positive class (hypoglycemia). The horizontal green line corresponds to the cut-off used for selecting the variables for inclusion in the final model.
Figure 4.
Figure 4.
Cross-validation error rate in LASSO. The upper x-axis refers to the number of variables with nonzero coefficient estimates, whereas the lower x-axis is the logarithmic value of the tuning parameter λ. The whiskers around the red dot are for the upper and lower standard deviation for the error estimates around the misclassification rate at a given λ. The left vertical dotted line corresponds λ min, with the lowest error and the right vertical dotted line is for the λ1se, whose error is within one standard deviation of the minimum. LASSO, Least Absolute Shrinkage and Selection Operator.
Figure 5.
Figure 5.
RF out-of-bag misclassification rates. The x-axis corresponds to the number of variables used in an iteration for building the RF model. An orange dot corresponds to the associated error rate. The right-most dot (x = 30) refers to the full model with all the variables. The error rate does not change much when the variables are reduced to nine, but it increases steeply for number of variables lower than nine. Based on this observation, the associated nine most important variables are selected in the final RF model. RF, Random Forests.
Figure 6.
Figure 6.
Confusion matrices for prediction horizons: (a) 0-15 minutes, (b) 15-30 minutes, (c) 30-45 minutes, and (d) 45-60 minutes. Confusion matrices for different prediction horizons here give details about the total number of hypoglycemic and non-hypoglycemic events in the test data. It provides the underlying information to calculate different classifier performance metrics.
Figure 7.
Figure 7.
ROC curves for prediction horizons: (Upper left) 0-15 minutes, (Upper right) 15-30 minutes, (Lower left) 30-45 minutes, and (Lower right) 45-60 minutes. ROC curves represent the trade-off between true positive and false positive rates. Y-axis refers to sensitivity and x-axis for specificity. The solid red line is marked for the trained RF model. The blue dot on it defines the optimal trade-off achieved between sensitivity and specificity. RF, Random Forests; ROC, Receiver Operating Characteristic.
Figure 8.
Figure 8.
(A) Comparison of sensitivity for various models at different prediction horizons. (B) Comparison of specificity for various models at different prediction horizons. The line charts give a comparison of the different models used in our analysis on sensitivity and specificity at various prediction horizons.

References

    1. Cox DJ, Irvine A, Gonder-Frederick L, Nowacek G, Butterfield J. Fear of hypoglycemia: quantification, validation, and utilization. Diabetes Care. 1987;10(5):617-621. - PubMed
    1. Patton SR, Dolan LM, Henry R, Powers SW. Fear of hypoglycemia in parents of young children with type 1 diabetes mellitus. J Clin Psychol Med Settings. 2008;15(3):252-259. - PMC - PubMed
    1. Van Name MA, Hilliard ME, Boyle CT, et al. Nighttime is the worst time: parental fear of hypoglycemia in young children with type 1 diabetes. Pediatr Diabetes. 2018;19(1):114-120. - PMC - PubMed
    1. Clarke WL, Gonder-Frederick LA, Snyder AL, Cox DJ. Maternal fear of hypoglycemia in their children with insulin dependent diabetes mellitus. J Pediatr Endocrinol Metab. 1998;11(suppl):189-194. - PubMed
    1. Freckleton E, Sharpe L, Mullan B. The relationship between maternal fear of hypoglycaemia and adherence in children with type-1 diabetes. Int J Behav Med. 2014;21(5):804-810. - PubMed

Publication types