Machine Learning-Based Glucose Prediction with Use of Continuous Glucose and Physical Activity Data: The Maastricht Study - European Medical Journal

Machine Learning-Based Glucose Prediction with Use of Continuous Glucose and Physical Activity Data: The Maastricht Study

2 Mins
Yuri D. Foreman,1,2 William P.T.M. van Doorn,1,3 Nicolaas C. Schaper,1,2 Hans H.C.M. Savelberg,4 Annemarie Koster,5,6 Carla J.H. van der Kallen,1,2 Anke Wesselius,4 Miranda T. Schram,1,2 Pieter C. Dagnelie,1,2 Bastiaan E. de Galan,1,2 Otto Bekers,1,3 Coen D.A. Stehouwer,1,2 Steven J.R. Meex,1,3 *Martijn C.G.J. Brouwers1,2

The authors have declared no conflicts of interest. The Maastricht Study was supported by the European Regional Development Fund (ERDF) via OP-Zuid, the Province of Limburg; the Dutch Ministry of Economic Affairs (grant 31O.041), Stichting De Weijerhorst (Maastricht, the Netherlands); the Pearl String Initiative Diabetes (Amsterdam, the Netherlands); School for Cardiovascular Diseases (CARIM, Maastricht, the Netherlands); School for Public Health and Primary Care (CAPHRI, Maastricht, the Netherlands); School for Nutrition and Translational Research in Metabolism (NUTRIM, Maastricht, the Netherlands); Stichting Annadal (Maastricht, the Netherlands); Health Foundation Limburg (Maastricht, the Netherlands); and by unrestricted grants from Janssen-Cilag B.V., Novo  Nordisk Farma B.V., Sanofi-Aventis Netherlands B.V., and Medtronic.


Mr Foreman, Mr van Doorn, Dr Meex, and Prof Brouwers equally contributed to the manuscript. The first authors contributed equally and the last authors contributed equally.

EMJ Diabet. ;8[1]:42-44. Abstract Review No: AR4.
Accelerometry, clinical error grids, continuous glucose monitoring (CGM), glucose prediction, machine learning.

Each article is made available under the terms of the Creative Commons Attribution-Non Commercial 4.0 License.


The closed-loop insulin delivery system is one of the most promising developments for individuals who require insulin treatment. Such a system combines continuous glucose monitoring (CGM), insulin (with or without glucagon) delivery, and a control algorithm to continuously regulate blood glucose levels.1,2 The merit of incorporating closed-loop insulin delivery systems into clinical care has been shown in individuals with Type 1 and Type 2 diabetes.3,4 Nevertheless, these devices may be further optimised by the ability to predict future glucose values, as it can be used to overcome both sensor delay (i.e., the inherent approximately 10-minute discrepancy between interstitially measured and actual plasma glucose values) and sensor malfunctions (i.e., periods during which no glucose values are recorded). The use of machine learning has yielded encouraging glucose prediction results in relatively small study populations or in silico studies.5Large, human-based studies are now needed to reliably investigate whether and within what time interval glucose values can be accurately predicted by using machine learning. In this proof-of-principle study, the authors assessed to what extent machine learning models can predict glucose values based on historical continuous glucose measurements and physical activity data.


Data from The Maastricht Study,6 an observational population-based cohort that comprises individuals with normal glucose metabolism, prediabetes, or Type 2 diabetes, was used. Included were individuals who underwent at least 48 hours of CGM (n=851), most of whom simultaneously wore a physical activity tracker. A random subset of individuals (70%) were used to train models at predicting glucose levels at 15- and 60-minute intervals based on 30 minutes of previous CGM data only, or combined CGM and physical activity data. In the remainder of the participants, predicted values were compared to actual glucose values and evaluated with root-mean-square error (RMSE), Spearman’s correlation coefficient (rho), and surveillance and Parkes error grids.7,8


Models trained with CGM data were able to accurately predict glucose values at 15 (RMSE: 0.19 mmol/L, rho: 0.96) and 60 minutes (RMSE: 0.59 mmol/L, rho: 0.72). Performance at 15 (RMSE: 0.29 mmol/L, rho: 0.99) and 60 minutes (RMSE: 0.70 mmol/L, rho: 0.78) was comparable in individuals with Type 2 diabetes. Incorporation of physical activity data only slightly improved glucose prediction in both the total study population (15-minute RMSE: 0.18 mmol/L, rho: 0.97; 60-minute RMSE: 0.58 mmol/L; rho: 0.73) and Type 2 diabetes population (15-minute RMSE: 0.27mmol/L, rho: 0.99; 60-minute RMSE: 0.70 mmol/L, rho: 0.79). According to surveillance error grids, glucose prediction was clinically safe at both 15 (>99%) and 60 minutes (>98%). In general, the models tended to underestimate rather than overestimate the actual glucose values.


In this proof-of-principle study, the authors showed that machine learning-based models are capable of accurately and safely predicting glucose values at 15- and 60-minute intervals. As such, the prediction models can be used to improve closed-loop dosing systems by overcoming sensor delay and bridging periods of sensor malfunction. Future research should extend and validate these results in individuals with Type 1 diabetes.

Cobelli C et al. Artificial pancreas: past, present, future. Diabetes. 2011;60(11):2672-82. Bruttomesso D. Toward Automated Insulin Delivery. N Engl J Med. 2019;381(18):1774-5. Weisman A et al. Effect of artificial pancreas systems on glycaemic control in patients with Type 1 diabetes: a systematic review and meta-analysis of outpatient randomised controlled trials. Lancet Diabetes Endocrinol. 2017;5(7):501-12. Kumareswaran K et al. Feasibility of closed-loop insulin delivery in Type 2 diabetes: a randomized controlled study. Diabetes Care. 2014;37(5):1198-203. Woldaregay AZ et al. Data-driven modeling and prediction of blood glucose dynamics: machine learning applications in Type 1 diabetes. Artif Intell Med. 2019;98:109-34. Schram MT et al. The Maastricht Study: an extensive phenotyping study on determinants of Type 2 diabetes, its complications and its comorbidities. Eur J Epidemiol. 2014;29(6):439-51. Klonoff DC et al. The surveillance error grid. J Diabetes Sci Technol. 2014;8(4):658-72. Pfutzner A et al. Technical aspects of the Parkes error grid. J Diabetes Sci Technol. 2013;7(5):1275-81.

Join our mailing list

To receive the EMJ updates straight to your inbox free of charge, please click the button below.
Join Now