Evaluation of machine learning models for early prediction of gestational diabetes using retrospective electronic health records from current and previous pregnancies

Objective To assess the performance of machine learning (ML) models in predicting gestational diabetes mellitus (GDM) using electronic health record (EHR) data from the first antenatal visit, and determine whether incorporating previous pregnancies data improves performance. Methods and analysis In this retrospective cohort study, ML models were developed to predict GDM using EHR data (n=27 561, GDM 11.6%). Four ML algorithms: Logistic Regression (LR), Random Forest (RF), XGBoost (XGB) and Explainable Boosting Machine (EBM) were trained with seven to nine top clinical predictors from the EHRs. Models were trained and evaluated in separate first-trimester (n=27 561), nulliparous (n=11 623) and multiparous and past-pregnancy (n=4005) cohorts. Discrimination was measured by the area under the receiver-operating characteristic curve (AUC, 95 % CI), and calibration was assessed by slope and intercept. Decision-curve analysis was performed for models. Results First-trimester models achieved AUC 0.819 (95% CI 0.811-0.827, slope=1.010, intercept=0.013) with LR, similar to more complex models such as XGB (AUC 0.818, slope=1.004, intercept=0.007), EBM (AUC 0.817, slope=0.988, intercept=-0.017) and RF (AUC 0.817, slope=1.062, intercept=0.103). Among nulliparous women, there was little difference between LR (AUC 0.813) and XGB, EBM or RF (0.805–0.814). When past pregnancy features were added to first-trimester data in multiparous women, discrimination improved: EBM AUC 0.885 (95% CI 0.867 to 0.900; slope 0.994), RF 0.878, LR 0.874 and XGB 0.876. Models using data from past pregnancies only achieved good discrimination (AUC 0.860, 95% CI 0.839 to 0.879; slope=1.028). Conclusion A small panel of clinically selected variables provides robust early-pregnancy GDM prediction (AUC ∼0.81) and even stronger performance (AUC ∼0.86–0.89) when past pregnancy information is incorporated in multiparous women. Past pregnancy data alone gives useful preconception risk estimates. These findings highlight the promise of early GDM risk identification in both nulliparous and multiparous populations; however, additional research, including external validation and clinical trials, is needed to determine the models’ practical utility and effect on maternal and neonatal outcomes.

Authors

Institutions

Publication Details

Journal
BMJ Digital Health & AI
Published
2025-12-01
DOI
https://doi.org/10.1136/bmjdhai-2025-000089
Citations
1
Primary Topic
Gestational Diabetes Research and Management
Type
article
Field-Weighted Citation Impact
2.06

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Evaluation of machine learning models for early prediction of gestational diabetes using retrospective electronic health records from current and previous pregnancies

Amy O’Higgins, Graham Healy, Brendan Egan, Mark Germaine
1 citations
BMJ Digital Health & AI
Gestational Diabetes Research and Management
2.06
article

Evaluation of machine learning models for early prediction of gestational diabetes using retrospective electronic health records from current and previous pregnancies

Amy O’Higgins, Graham Healy, Brendan Egan, Mark Germaine
article en
1 citations

Abstract

Objective To assess the performance of machine learning (ML) models in predicting gestational diabetes mellitus (GDM) using electronic health record (EHR) data from the first antenatal visit, and determine whether incorporating previous pregnancies data improves performance. Methods and analysis In this retrospective cohort study, ML models were developed to predict GDM using EHR data (n=27 561, GDM 11.6%). Four ML algorithms: Logistic Regression (LR), Random Forest (RF), XGBoost (XGB) and Explainable Boosting Machine (EBM) were trained with seven to nine top clinical predictors from the EHRs. Models were trained and evaluated in separate first-trimester (n=27 561), nulliparous (n=11 623) and multiparous and past-pregnancy (n=4005) cohorts. Discrimination was measured by the area under the receiver-operating characteristic curve (AUC, 95 % CI), and calibration was assessed by slope and intercept. Decision-curve analysis was performed for models. Results First-trimester models achieved AUC 0.819 (95% CI 0.811-0.827, slope=1.010, intercept=0.013) with LR, similar to more complex models such as XGB (AUC 0.818, slope=1.004, intercept=0.007), EBM (AUC 0.817, slope=0.988, intercept=-0.017) and RF (AUC 0.817, slope=1.062, intercept=0.103). Among nulliparous women, there was little difference between LR (AUC 0.813) and XGB, EBM or RF (0.805–0.814). When past pregnancy features were added to first-trimester data in multiparous women, discrimination improved: EBM AUC 0.885 (95% CI 0.867 to 0.900; slope 0.994), RF 0.878, LR 0.874 and XGB 0.876. Models using data from past pregnancies only achieved good discrimination (AUC 0.860, 95% CI 0.839 to 0.879; slope=1.028). Conclusion A small panel of clinically selected variables provides robust early-pregnancy GDM prediction (AUC ∼0.81) and even stronger performance (AUC ∼0.86–0.89) when past pregnancy information is incorporated in multiparous women. Past pregnancy data alone gives useful preconception risk estimates. These findings highlight the promise of early GDM risk identification in both nulliparous and multiparous populations; however, additional research, including external validation and clinical trials, is needed to determine the models’ practical utility and effect on maternal and neonatal outcomes.

BMJ Digital Health & AIVol. 1(1)
Florida Institute for Human and Machine Cognition (US), Coombe Women & Infants University Hospital (IE), Dublin City University (IE)
Dublin City University
Openalex Percentile: Top 10%
Gestational Diabetes Research and Management
2.06
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.