Using machine learning methods to predict the risk of exercise – induced hypoglycemia in people with Type 1 diabetes

Lead Investigator: Catherine Russon, University of Exeter
Title of Proposal Research: Using machine learning methods to predict the risk of exercise-induced hypoglycemia in people with Type 1 diabetes
Vivli Data Request: 8766
Funding Source: The government funding body E3 is funding the PhD of the lead researcher on this project
Potential Conflicts of Interest: None

Summary of the Proposed Research:

Exercise offers a number of benefits to individuals with type 1 diabetes (T1D), including reduced risk of coronary artery disease and stroke, as well as improved blood pressure, lowered daily insulin requirements, and reduced diabetic complications, such as retinopathy and neuropathy.
The American Diabetic Association recommends 150 minutes of aerobic exercise a week for people with T1D but few are reaching this target. One of the main reasons for this is fear of exercise-induced hypoglycaemia.

Hypoglycemia occurs when blood glucose (BG) drops below 3.9 mmol/L and can vary in severity, with side effects ranging from dizziness, anxiety and nausea to unconsciousness, seizures and even death. Exercised-induced hypoglycaemia can occur not only during exercise, but for up to 36 after exercise and also overnight.

In addition, understanding glycaemic response to exercise is challenging for people with T1D since it is affected by so many factors. Firstly, different types of exercise will have different effects on BG levels, for example aerobic exercise will decrease BG levels whereas anaerobic exercise will increase levels. The glycemic response is also affected by duration and intensity of exercise, amount of insulin on board, location of insulin delivery, the starting BG before exercise, and the last meal or snack. This is further complicated by the fact that people with T1D often will not notice their symptoms when exercising. This complex interaction of factors make hypoglycaemia around exercise very difficult to predict and prevent.

It is therefore understandable that people with T1D are less active and reluctant to exercise, when in addition to common barriers to exercise reported in the general population, they may also experience the discomfort of changes in glucose levels and heightened risk of hypoglycaemia.

Wearable sensors are becoming increasingly common tools in the management of T1D. From continuous glucose monitors (CGMs) and insulin pumps, to smartphone apps, heart rate (HR) monitors, and physical activity trackers available, the accessibility of these devices is opening up many opportunities to get relevant data. If we can harness data from these devices to effectively predict hypoglycaemia around exercise, we can offer people with T1D practical guidance for effectively avoiding hypoglycaemia around exercise, enabling them to feel more confident about exercising.

Our goal is to utilise wearable technology paired with machine learning techniques to develop a tool that predicts whether hypoglycaemia is going to occur during or after exercise and provide them with simple, actionable guidance. With this, we hope to assist people with T1D allow patients to take action to avoid hypoglycaemia and thus exercise more safely.

Statistical Analysis Plan:

All data analysis for this project will be conducted in Python 3.7 and all code will be accessible and open source.
For the ML, data is divided into a training and test set. The model learns the patterns from the training data and is not exposed to the test set until the validation stage. However, we are making our data analysis even more rigorous by using stratified k-fold sampling, in which multiple models are trained with different portions of the data set as the training and test sets. This allows us to see the variation in performance of the model and perform statistical analysis on the results to give us a more robust measure of effectiveness/accuracy.
The ML models used to analyse the data in this study are a logistic regression implemented with SciKit Learn (17), an extreme gradient boosting algorithm implements with XGBoost (18) and three neural networks implemented with Keras (19). For the first two models, the hyperparameters will be tuned with Bayesian hyperparameter tuning, implemented with Optuna (20).
The effectiveness of the models will be measured for two outcomes. The first is a binary classification, giving us a yes/no value for whether hypoglycemia will occur. The metrics we will use to assess effectiveness for this outcome are accuracy, balanced accuracy, sensitivity/recall, specificity, precision and F1 score. The second outcome will use the predicted probabilities paired with calibration to produce a risk score, e.g. you have a 60% risk of hypoglycemia during exercise. For this outcome we will use area under the receiver operator curve (ROC AUC) score, logloss and Brier score. These metrics will be calculated using SciKit Learn and StatsModel (21).
Shapley additive values will be applied to the complex models to understand how feature values influence the final prediction.
Subgroup analysis will be conducted on the results to assess if the model is biased towards certain groups, specifically we will explore sex, ethnicity and age.

Requested Studies:

Type 1 Diabetes EXercise Initiative: The Effect of Exercise on Glycemic Control in Type 1 Diabetes Study
Data Contributor: Jaeb Center for Health Research Foundation, Inc.
Study ID: T1-DEXI
Sponsor ID: T1-DEXI

Type 1 Diabetes EXercise Initiative Pediatric Study (T1DexiP): The Effect of Exercise on Glycemic Control in Youth with Type 1 Diabetes
Data Contributor: Jaeb Center for Health Research Foundation, Inc.
Study ID: T1-DEXIP
Sponsor ID: T1-DEXIP

Public Disclosures:

Russon, C.L., Allen, M.J., Pulsford, R.M., Saunby, M., Vaughan, N., Cocks, M., Hesketh, K.L., Low, J. and Andrews, R.C., 2024. A User-Friendly Web Tool for Custom Analysis of Continuous Glucose Monitoring Data. Journal of Diabetes Science and Technology, 18(6), pp.1511-1513. Doi: 10.1177/19322968241274322