Algorithm Predicts Hyperglycemia in Gestational Diabetes

Marlene Busko

July 07, 2022

Researchers published the study covered in this summary on as a preprint that has not yet been peer reviewed.

Key Takeaways

  • Researchers used machine learning to develop an algorithm that can identify women previously diagnosed with gestational diabetes mellitus (GDM) who are at high risk for an impending, acute episode of hyperglycemia.

  • The algorithm refined by machine learning is based on the most recent 3 days of self-reported glucose readings, and it piggybacks onto a system, GDm-Health, previously developed by some of the same researchers that gives women diagnosed with GDM a way to systematically record multiple glucose self- measurements daily.

  • The goal of the new algorithm is to help clinicians identify women with GDM who need urgent clinical review of their diabetes management and possible medication adjustment.

  • The algorithm is in early stages of development and has several limitations that need to be resolved before it is ready for routine use in clinical practice

Why This Matters

  • Appropriate assessment, management, and treatment of GDM can reduce GDM-related maternal and fetal complications.

  • This algorithm automates the process of identifying women who need urgent clinical review and more care to manage their GDM, which helps clinicians provide patient-centered care and makes better use of limited resources at a time when the prevalence of GDM is increasing.

  • This algorithm could be an intelligent add-on to the smartphone–based GDm-Health system for monitoring women with GDM or as a stand-alone system for any GDM clinic if they have access to patients' daily blood glucose data.

  • This is the first machine learning–based stratification system for quantifying hyperglycemia risk in women with GDM.

Study Design

  • Development and internal validation of the predictive model used 272,712 blood glucose readings from 1148 women with GDM who were seen at Oxford University Hospitals from April 2018 to May 2021. Development used data from 672 of these pregnancies, and initial validation used data from another 168 pregnancies. Further validation used data from an additional 186 pregnancies managed at a different hospital in England.

  • All participants used the GDm-Health smartphone app for recording blood glucose measurement and to communicate the information to the researchers. The goal for participants was to measure and record their glucose levels four to six times daily at least 3 times a week.

  • The researchers assessed the regression models they developed based on their mean squared error (MSE), their R2 value (measure of a model's goodness of fit), and their mean absolute error (MAE).

Key Results

  • The MSE, R2, MAE, and rank accuracy scores all suggested that the best-performing model was moderately accurate for predicting high blood glucose readings but requires further refinement to be suitable for clinical practice.

  • The analyses also showed that tree-based ensemble models significantly outperformed a linear model. This may be because tree-based models consider nonlinear effects of the data inputs.

  • In general, overall performance of the models did not significantly change by adding additional measures beyond blood glucose levels. This may be because of the size of the dataset: A larger number of inputs often requires a larger sample size for training of a model.


  • The model was moderately accurate for predicting high blood glucose readings but needs further refinement with a larger sample to improve accuracy and to determine which confounders need inclusion to make it suitable for clinical practice.

  • Because each participant was responsible for collecting and recording their blood glucose data the number of entries varied widely, with some women entering more values than others, which may have introduced a bias.

  • The data collected did not make it clear when patients started or stopped taking GDM-related medication.

  • Many study participants had missing data. Removing participants with missing values left 70% of the internal validation cohort and 25% of the external validation cohort. Future work on the algorithm should use more data, and future models could consider adding additional measures, such as body mass index.

  • The authors acknowledged that other measurements not included in their analysis may work better than a model based exclusively on blood glucose.


  • The study did not receive commercial funding.

  • One author reports personal fees from Oxford University Innovation, BioBeats, and Sensyne Health, outside the submitted work. Another author is a part-time employee of Sensyne Health.

This is a summary of a preprint research study "Machine Learning–Based Risk Stratification for Gestational Diabetes Management" written by researchers primarily from the University of Oxford, England, on medRxiv and provided to you by Medscape. This study has not yet been peer reviewed. The full text of the study can be found on

Follow Medscape on Facebook, Twitter, Instagram, and YouTube


Comments on Medscape are moderated and should be professional in tone and on topic. You must declare any conflicts of interest related to your comments and responses. Please see our Commenting Guide for further information. We reserve the right to remove posts at our sole discretion.