1
|
Neumann A, Zghal Y, Cremona MA, Hajji A, Morin M, Rekik M. A data-driven personalized approach to predict blood glucose levels in type-1 diabetes patients exercising in free-living conditions. Comput Biol Med 2025; 190:110015. [PMID: 40164029 DOI: 10.1016/j.compbiomed.2025.110015] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [Key Words] [MESH Headings] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Received: 04/26/2024] [Revised: 01/16/2025] [Accepted: 03/07/2025] [Indexed: 04/02/2025]
Abstract
OBJECTIVE The development of new technologies has generated vast amount of data that can be analyzed to better understand and predict the glycemic behavior of people living with type 1 diabetes. This paper aims to assess whether a data-driven approach can accurately and safely predict blood glucose levels in patients with type 1 diabetes exercising in free-living conditions. METHODS Multiple machine learning (XGBoost, Random Forest) and deep learning (LSTM, CNN-LSTM, Dual-encoder with Attention layer) regression models were considered. Each deep-learning model was implemented twice: first, as a personalized model trained solely on the target patient's data, and second, as a fine-tuned model of a population-based training model. The datasets used for training and testing the models were derived from the Type 1 Diabetes Exercise Initiative (T1DEXI). A total of 79 patients in T1DEXI met our inclusion criteria. Our models used various features related to continuous glucose monitoring, insulin pumps, carbohydrate intake, exercise (intensity and duration), and physical activity-related information (steps and heart rate). This data was available for four weeks for each of the 79 included patients. Three prediction horizons (10, 20, and 30 min) were tested and analyzed. RESULTS For each patient, there always exists either a machine learning or a deep learning model that conveniently predicts BGLs for up to 30 min. The best performing model differs from one patient to another. When considering the best performing model for each patient, the median and the mean Root Mean Squared Error (RMSE) values (across the 79 patients) for predictions made 10 min ahead were 6.99 mg/dL and 7.46 mg/dL, respectively. For predictions made 30 min ahead, the median and mean RMSE values were 16.85 mg/dL and 17.74 mg/dL, respectively. The majority of the predictions output by the best model of each patient fell within the clinically safe zones A and B of the Clarke Error Grid (CEG), with almost no predictions falling into the unsafe zone E. The most challenging patient to predict 30 min ahead achieved an RMSE value of 32.31 mg/dL (with the corresponding best performing model). The best-predicted patient had an RMSE value of 10.48 mg/dL. Predicting blood glucose levels was more difficult during and after exercise, resulting in higher RMSE values on average. Prediction errors during and after physical activity (two hours and four hours after) generally remained within the clinical safe zones of the CEG with less than 0.5% of predictions falling into the harmful zones D and E, regardless of the exercise category. CONCLUSIONS Data-driven approaches can accurately predict blood glucose levels in type 1 diabetes patients exercising in free-living conditions. The best-performing model varies across patients. Approaches in which a population-based model is initially trained and then fine-tuned for each individual patient generally achieve the best performance for the majority of patients. Some patients remain challenging to predict with no straightforward explanation of why a patient is more challenging to predict than another.
Collapse
Affiliation(s)
- Anas Neumann
- Université Laval - Department of Operations and Decision Systems, Faculty of Business Administration, Canada; Polytechnique Montréal - Department of Mathematical and Industrial Engineering, Canada.
| | - Yessine Zghal
- Université Laval - Department of Operations and Decision Systems, Faculty of Business Administration, Canada.
| | - Marzia Angela Cremona
- Université Laval - Department of Operations and Decision Systems, Faculty of Business Administration, Canada; The Research Network on Cardiometabolic Health, Diabetes, and Obesity (CMDO), Canada; University Hospital Center of Québec - Université Laval Research Center (CHUL), Canada.
| | - Adnene Hajji
- Université Laval - Department of Operations and Decision Systems, Faculty of Business Administration, Canada.
| | - Michael Morin
- Université Laval - Department of Operations and Decision Systems, Faculty of Business Administration, Canada; The Research Network on Cardiometabolic Health, Diabetes, and Obesity (CMDO), Canada.
| | - Monia Rekik
- Université Laval - Department of Operations and Decision Systems, Faculty of Business Administration, Canada; The Research Network on Cardiometabolic Health, Diabetes, and Obesity (CMDO), Canada; University Hospital Center of Québec - Université Laval Research Center (CHUL), Canada.
| |
Collapse
|
2
|
Bian Q, As'arry A, Cong X, Rezali KABM, Raja Ahmad RMKB. A hybrid Transformer-LSTM model apply to glucose prediction. PLoS One 2024; 19:e0310084. [PMID: 39259758 PMCID: PMC11389913 DOI: 10.1371/journal.pone.0310084] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [MESH Headings] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Received: 01/22/2024] [Accepted: 08/23/2024] [Indexed: 09/13/2024] Open
Abstract
The global prevalence of diabetes is escalating, with estimates indicating that over 536.6 million individuals were afflicted by 2021, accounting for approximately 10.5% of the world's population. Effective management of diabetes, particularly monitoring and prediction of blood glucose levels, remains a significant challenge due to the severe health risks associated with inaccuracies, such as hypoglycemia and hyperglycemia. This study addresses this critical issue by employing a hybrid Transformer-LSTM (Long Short-Term Memory) model designed to enhance the accuracy of future glucose level predictions based on data from Continuous Glucose Monitoring (CGM) systems. This innovative approach aims to reduce the risk of diabetic complications and improve patient outcomes. We utilized a dataset which contain more than 32000 data points comprising CGM data from eight patients collected by Suzhou Municipal Hospital in Jiangsu Province, China. This dataset includes historical glucose readings and equipment calibration values, making it highly suitable for developing predictive models due to its richness and real-time applicability. Our findings demonstrate that the hybrid Transformer-LSTM model significantly outperforms the standard LSTM model, achieving Mean Square Error (MSE) values of 1.18, 1.70, and 2.00 at forecasting intervals of 15, 30, and 45 minutes, respectively. This research underscores the potential of advanced machine learning techniques in the proactive management of diabetes, a critical step toward mitigating its impact.
Collapse
Affiliation(s)
- QingXiang Bian
- Department of Mechanical and Manufacturing Engineering, Faculty of Engineering, Universiti Putra Malaysia, Serdang, Malaysia
| | - Azizan As'arry
- Department of Mechanical and Manufacturing Engineering, Faculty of Engineering, Universiti Putra Malaysia, Serdang, Malaysia
| | - XiangGuo Cong
- Department of Endocrinology, Suzhou Municipal Hospital, The Affiliated Suzhou Hospital of Nanjing Medical University, Suzhou, China
| | - Khairil Anas Bin Md Rezali
- Department of Mechanical and Manufacturing Engineering, Faculty of Engineering, Universiti Putra Malaysia, Serdang, Malaysia
| | - Raja Mohd Kamil Bin Raja Ahmad
- Department of Electric and Electronics Engineering, Faculty of Engineering, Universiti Putra Malaysia, Serdang, Malaysia
| |
Collapse
|
3
|
Yang H, Li W, Tian M, Ren Y. A personalized multitasking framework for real-time prediction of blood glucose levels in type 1 diabetes patients. MATHEMATICAL BIOSCIENCES AND ENGINEERING : MBE 2024; 21:2515-2541. [PMID: 38454694 DOI: 10.3934/mbe.2024111] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [Key Words] [MESH Headings] [Track Full Text] [Subscribe] [Scholar Register] [Indexed: 03/09/2024]
Abstract
Real-time prediction of blood glucose levels (BGLs) in individuals with type 1 diabetes (T1D) presents considerable challenges. Accordingly, we present a personalized multitasking framework aimed to forecast blood glucose levels in patients. The patient data was initially categorized according to gender and age and subsequently utilized as input for a modified GRU network model, creating five prediction sub-models. The model hyperparameters were optimized and tuned after introducing the decay factor and incorporating the TCN network and attention mechanism into the GRU model. This step was undertaken to improve the capability of feature extraction. The Ohio T1DM clinical dataset was used to train and evaluate the performance of the proposed model. The metrics, including Root Mean Square Error (RMSE), Mean Absolute Error (MAE) and Clark Error Grid Analysis (EGA), were used to evaluate the performance. The results showed that the average RMSE and the MAE of the proposed model were 16.896 and 9.978 mg/dL, respectively, over the prediction horizon (PH) of 30 minutes. The average RMSE and the MAE were 28.881 and 19.347 mg/dL, respectively, over the PH of 60 min. The proposed model demonstrated excellent prediction accuracy. In addition, the EGA analysis showed that the proposed model accurately predicted 30-minute and 60-minute PH within zones A and B, demonstrating that the framework is clinically feasible. The proposed personalized multitask prediction model in this study offers robust assistance for clinical decision-making, playing a pivotal role in improving the outcomes of individuals with diabetes.
Collapse
Affiliation(s)
- Huazhong Yang
- School of Computer Science, Yangtze University, Jingzhou 434000, China
| | - Wang Li
- Archives, Yangtze University, Jingzhou 434000, China
| | - Maojin Tian
- School of Public Health, Zunyi Medical University, Zunyi 563000, China
| | - Yangfeng Ren
- School of Petroleum Engineering, Yangtze University, Wuhan 430100, China
| |
Collapse
|
4
|
Villarrubia-Martin EA, Rodriguez-Benitez L, Jimenez-Linares L, Muñoz-Valero D, Liu J. A Hybrid Online Off-Policy Reinforcement Learning Agent Framework Supported by Transformers. Int J Neural Syst 2023; 33:2350065. [PMID: 37857407 DOI: 10.1142/s012906572350065x] [Citation(s) in RCA: 1] [Impact Index Per Article: 0.5] [Reference Citation Analysis] [Abstract] [Key Words] [MESH Headings] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Indexed: 10/21/2023]
Abstract
Reinforcement learning (RL) is a powerful technique that allows agents to learn optimal decision-making policies through interactions with an environment. However, traditional RL algorithms suffer from several limitations such as the need for large amounts of data and long-term credit assignment, i.e. the problem of determining which actions actually produce a certain reward. Recently, Transformers have shown their capacity to address these constraints in this area of learning in an offline setting. This paper proposes a framework that uses Transformers to enhance the training of online off-policy RL agents and address the challenges described above through self-attention. The proposal introduces a hybrid agent with a mixed policy that combines an online off-policy agent with an offline Transformer agent using the Decision Transformer architecture. By sequentially exchanging the experience replay buffer between the agents, the agent's learning training efficiency is improved in the first iterations and so is the training of Transformer-based RL agents in situations with limited data availability or unknown environments.
Collapse
Affiliation(s)
- Enrique Adrian Villarrubia-Martin
- Department of Technologies and Information Systems, Universidad de Castilla-La Mancha, Paseo de la Universidad 4, 13005 Ciudad Real, Spain
| | - Luis Rodriguez-Benitez
- Department of Technologies and Information Systems, Universidad de Castilla-La Mancha, Paseo de la Universidad 4, 13005 Ciudad Real, Spain
| | - Luis Jimenez-Linares
- Department of Technologies and Information Systems, Universidad de Castilla-La Mancha, Paseo de la Universidad 4, 13005 Ciudad Real, Spain
| | - David Muñoz-Valero
- Department of Technologies and Information Systems, Universidad de Castilla-La Mancha, Avenida Carlos III, s/n, 45004 Toledo, Spain
| | - Jun Liu
- School of Computing, University of Ulster, Northern Ireland, UK
| |
Collapse
|
5
|
Del Giorno S, D’Antoni F, Piemonte V, Merone M. A New Glycemic closed-loop control based on Dyna-Q for Type-1-Diabetes. Biomed Signal Process Control 2023. [DOI: 10.1016/j.bspc.2022.104492] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Indexed: 12/14/2022]
|
6
|
Afsaneh E, Sharifdini A, Ghazzaghi H, Ghobadi MZ. Recent applications of machine learning and deep learning models in the prediction, diagnosis, and management of diabetes: a comprehensive review. Diabetol Metab Syndr 2022; 14:196. [PMID: 36572938 PMCID: PMC9793536 DOI: 10.1186/s13098-022-00969-9] [Citation(s) in RCA: 15] [Impact Index Per Article: 5.0] [Reference Citation Analysis] [Abstract] [Key Words] [Track Full Text] [Journal Information] [Submit a Manuscript] [Subscribe] [Scholar Register] [Received: 10/06/2022] [Accepted: 12/16/2022] [Indexed: 12/28/2022] Open
Abstract
Diabetes as a metabolic illness can be characterized by increased amounts of blood glucose. This abnormal increase can lead to critical detriment to the other organs such as the kidneys, eyes, heart, nerves, and blood vessels. Therefore, its prediction, prognosis, and management are essential to prevent harmful effects and also recommend more useful treatments. For these goals, machine learning algorithms have found considerable attention and have been developed successfully. This review surveys the recently proposed machine learning (ML) and deep learning (DL) models for the objectives mentioned earlier. The reported results disclose that the ML and DL algorithms are promising approaches for controlling blood glucose and diabetes. However, they should be improved and employed in large datasets to affirm their applicability.
Collapse
|
7
|
D’Antoni F, Petrosino L, Sgarro F, Pagano A, Vollero L, Piemonte V, Merone M. Prediction of Glucose Concentration in Children with Type 1 Diabetes Using Neural Networks: An Edge Computing Application. Bioengineering (Basel) 2022; 9:bioengineering9050183. [PMID: 35621461 PMCID: PMC9137786 DOI: 10.3390/bioengineering9050183] [Citation(s) in RCA: 3] [Impact Index Per Article: 1.0] [Reference Citation Analysis] [Abstract] [Track Full Text] [Download PDF] [Figures] [Journal Information] [Subscribe] [Scholar Register] [Received: 02/28/2022] [Revised: 04/14/2022] [Accepted: 04/18/2022] [Indexed: 11/16/2022] Open
Abstract
Background: Type 1 Diabetes Mellitus (T1D) is an autoimmune disease that can cause serious complications that can be avoided by preventing the glycemic levels from exceeding the physiological range. Straightforwardly, many data-driven models were developed to forecast future glycemic levels and to allow patients to avoid adverse events. Most models are tuned on data of adult patients, whereas the prediction of glycemic levels of pediatric patients has been rarely investigated, as they represent the most challenging T1D population. Methods: A Convolutional Neural Network (CNN) and a Long Short-Term Memory (LSTM) Recurrent Neural Network were optimized on glucose, insulin, and meal data of 10 virtual pediatric patients. The trained models were then implemented on two edge-computing boards to evaluate the feasibility of an edge system for glucose forecasting in terms of prediction accuracy and inference time. Results: The LSTM model achieved the best numeric and clinical accuracy when tested in the .tflite format, whereas the CNN achieved the best clinical accuracy in uint8. The inference time for each prediction was far under the limit represented by the sampling period. Conclusion: Both models effectively predict glucose in pediatric patients in terms of numerical and clinical accuracy. The edge implementation did not show a significant performance decrease, and the inference time was largely adequate for a real-time application.
Collapse
Affiliation(s)
- Federico D’Antoni
- Unit of Computer Systems and Bioinformatics, Department of Engineering, Università Campus Bio-Medico di Roma, 00128 Rome, Italy; (L.P.); (F.S.); (A.P.); (L.V.)
- Correspondence: (F.D.); (M.M.)
| | - Lorenzo Petrosino
- Unit of Computer Systems and Bioinformatics, Department of Engineering, Università Campus Bio-Medico di Roma, 00128 Rome, Italy; (L.P.); (F.S.); (A.P.); (L.V.)
| | - Fabiola Sgarro
- Unit of Computer Systems and Bioinformatics, Department of Engineering, Università Campus Bio-Medico di Roma, 00128 Rome, Italy; (L.P.); (F.S.); (A.P.); (L.V.)
| | - Antonio Pagano
- Unit of Computer Systems and Bioinformatics, Department of Engineering, Università Campus Bio-Medico di Roma, 00128 Rome, Italy; (L.P.); (F.S.); (A.P.); (L.V.)
| | - Luca Vollero
- Unit of Computer Systems and Bioinformatics, Department of Engineering, Università Campus Bio-Medico di Roma, 00128 Rome, Italy; (L.P.); (F.S.); (A.P.); (L.V.)
| | - Vincenzo Piemonte
- Unit of Chemical Engineering, Department of Engineering, Università Campus Bio-Medico di Roma, 00128 Rome, Italy;
| | - Mario Merone
- Unit of Computer Systems and Bioinformatics, Department of Engineering, Università Campus Bio-Medico di Roma, 00128 Rome, Italy; (L.P.); (F.S.); (A.P.); (L.V.)
- Correspondence: (F.D.); (M.M.)
| |
Collapse
|
8
|
Jabbour G, Bragazzi NL. Continuous Blood Glucose Monitoring Increases Vigorous Physical Activity Levels and Is Associated With Reduced Hypoglycemia Avoidance Behavior In Youth With Type 1 Diabetes. Front Endocrinol (Lausanne) 2021; 12:722123. [PMID: 34557162 PMCID: PMC8454404 DOI: 10.3389/fendo.2021.722123] [Citation(s) in RCA: 1] [Impact Index Per Article: 0.3] [Reference Citation Analysis] [Abstract] [Key Words] [MESH Headings] [Track Full Text] [Download PDF] [Figures] [Journal Information] [Submit a Manuscript] [Subscribe] [Scholar Register] [Received: 06/08/2021] [Accepted: 08/20/2021] [Indexed: 12/30/2022] Open
Abstract
The primary goal of this study was to explore physical activity (PA) levels, hypoglycemia fear scores and hypoglycemia episodes according to insulin administration and blood glucose monitoring methods in youth with type 1 diabetes (T1D). A self-administered questionnaire was completed by 28 children and 33 adolescents with T1D, and their PA was assessed. Hypoglycemia episodes, fear of hypoglycemia scores, insulin therapy (pump vs. injection) and blood glucose monitoring (continuous blood glucose monitors [CGMs] vs. blood glucose meters) methods are reported in the present work. There were no significant differences in the number of hypoglycemic episodes, child hypoglycemia fear survey behavior or total scores, or any components of the PA profile between youth using injections and those using a pump. However, these variables differed significantly when compared according to blood glucose monitoring method (CGMs vs. blood glucose meters): 41.2 vs. 81.8, p<0.01; 1.03 ± 0.05 vs. 2.6 ± 0.63, p<0.01; 1.09 ± 0.43 vs. 2.94 ± 0.22, p<0.01; and 222 ± 18 vs. 49 ± 11, p<0.01 (for total time in vigorous PA in minutes per week), respectively. CGM use correlated significantly with VPA levels (β=0.6; p=0.04). Higher VPA levels were associated with higher child hypoglycemia fear survey behavior scores (β=0.52; p=0.04). The latter correlates negatively with the number of episodes of hypoglycemia in the past 12 months in all category groups. The type of insulin injection was not associated with more activity in youth with T1D. In contrast, CGM use may be associated with increased vigorous PA among T1D youth. Those with higher hypoglycemia fear survey behavior scores engaged in more VPA and had fewer hypoglycemia episodes. Although CGM use ensures continuous monitoring of glycemia during exercise, increasing hypoglycemia avoidance behavior is still a necessary part of exercise management strategies in active youth with T1D.
Collapse
Affiliation(s)
- Georges Jabbour
- Department of Physical Education, College of Education, Qatar University, Doha, Qatar
- *Correspondence: Georges Jabbour, ,
| | - Nicola Luigi Bragazzi
- Laboratory for Industrial and Applied Mathematics (LIAM), Department of Mathematics and Statistics, York University, Toronto, ON, Canada
- Department of Health Sciences (DISSAL), Postgraduate School of Public Health, University of Genoa, Genoa, Italy
| |
Collapse
|