Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Wednesday, July 01, 2020 at 8:00 PM to 10:00 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Previously submitted to: JMIR Diabetes (no longer under consideration since Apr 17, 2026)

Date Submitted: Apr 9, 2026
Open Peer Review Period: Apr 17, 2026 - Apr 17, 2026
(closed for review but you can still tweet)

NOTE: This is an unreviewed Preprint

Warning: This is a unreviewed preprint (What is a preprint?). Readers are warned that the document has not been peer-reviewed by expert/patient reviewers or an academic editor, may contain misleading claims, and is likely to undergo changes before final publication, if accepted, or may have been rejected/withdrawn (a note "no longer under consideration" will appear above).

Peer review me: Readers with interest and expertise are encouraged to sign up as peer-reviewer, if the paper is within an open peer-review period (in this case, a "Peer Review Me" button to sign up as reviewer is displayed above). All preprints currently open for review are listed here. Outside of the formal open peer-review period we encourage you to tweet about the preprint.

Citation: Please cite this preprint only for review purposes or for grant applications and CVs (if you are the author).

Final version: If our system detects a final peer-reviewed "version of record" (VoR) published in any journal, a link to that VoR will appear below. Readers are then encourage to cite the VoR instead of this preprint.

Settings: If you are the author, you can login and change the preprint display settings, but the preprint URL/DOI is supposed to be stable and citable, so it should not be removed once posted.

Submit: To post your own preprint, simply submit to any JMIR journal, and choose the appropriate settings to expose your submitted version as preprint.

Warning: This is an author submission that is not peer-reviewed or edited. Preprints - unless they show as "accepted" - should not be relied on to guide clinical practice or health-related behavior and should not be reported in news media as established information.

Early Prediction of Gestational Diabetes Mellitus Using Machine Learning: A Random Forest, Logistic Regression, and XGBoost Approach

  • Sadia Syed

ABSTRACT

Background:

Gestational diabetes mellitus (GDM) is a pregnancy-related complication that can result in serious maternal and fetal outcomes if not diagnosed early. Conventional diagnostic methods, such as oral glucose tolerance tests (OGTT), detect GDM later in pregnancy, delaying timely intervention.

Objective:

This study aims to develop an interpretable machine learning framework for early prediction of GDM using routinely collected clinical features, improving the reliability and timeliness of clinical decision-making.

Methods:

A clinical dataset of 1,012 pregnant women was analyzed, including features such as age, number of pregnancies, weight, height, BMI, and family history of diabetes. Missing values were imputed, and class imbalance was addressed via oversampling. Three machine learning models—Random Forest (RF), Logistic Regression (LR), and XGBoost (XGB) were implemented to classify cases as GDM or non-GDM. Model performance was evaluated using accuracy, precision, recall, F1-score, and ROC-AUC. Feature importance was analyzed to ensure clinical interpretability.

Results:

Random Forest outperformed other models with an accuracy of 0.89, precision of 0.78, recall of 0.70, F1-score of 0.74, and ROC-AUC of 0.884. Logistic Regression achieved lower recall (0.52) and F1-score (0.62), while XGBoost showed moderate performance (F1-score 0.70). Feature importance analysis identified BMI, age, weight, and number of pregnancies as the most predictive variables, consistent with clinical knowledge. Low false-negative rates in Random Forest indicate high clinical reliability for early GDM detection.

Conclusions:

The proposed Random Forest-based framework demonstrates high discriminative ability, interpretability, and reproducibility for early GDM prediction. Its integration into clinical decision support systems could enable timely interventions, personalized monitoring, and improved maternal and fetal outcomes. External validation on multi-center datasets and incorporation of additional clinical and lifestyle variables are recommended to enhance generalizability. Clinical Trial: Not applicable.


 Citation

Please cite as:

Syed S

Early Prediction of Gestational Diabetes Mellitus Using Machine Learning: A Random Forest, Logistic Regression, and XGBoost Approach

JMIR Preprints. 09/04/2026:97730

DOI: 10.2196/preprints.97730

URL: https://preprints.jmir.org/preprint/97730

Download PDF


Request queued. Please wait while the file is being generated. It may take some time.

© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.