Machine Learning-Based Early Prediction of Gestational Diabetes Using First-Trimester Laboratory Parameters

Jenifar Prashanthan1, Amirthanathan Prashanthan2

  • 1Department of Diabetes and Endocrinology, Colombo South Teaching Hospital, Colombo, LKA.

Cureus
|April 7, 2026
PubMed

Background and aim Gestational diabetes mellitus (GDM) affects 6-15% of pregnancies globally and is traditionally diagnosed at 24-28 weeks of gestation. Early identification of high-risk women during the first trimester could enable timely interventions and improved pregnancy outcomes. This study aimed to develop and evaluate machine learning models for early GDM prediction using first-trimester clinical and laboratory parameters. To achieve this aim, the study has the following five key objectives: first, to generate a clinically representative synthetic dataset incorporating demographic characteristics, clinical risk factors, and first-trimester laboratory parameters; second, to implement comprehensive feature selection methodologies to identify optimal predictors from candidate variables; third, to systematically evaluate multiple machine learning algorithms with hyperparameter optimization; fourth, to assess model interpretability using SHapley Additive exPlanations (SHAP) analysis; and fifth, to establish clinically actionable threshold values for first-trimester biomarkers. Methods A synthetic dataset of 10,000 patient records was generated using evidence-based probabilistic modeling, incorporating demographic characteristics (maternal age, pre-pregnancy BMI, ethnicity), clinical risk factors (family history of diabetes, previous GDM, polycystic ovary syndrome (PCOS), previous macrosomia), and first-trimester laboratory parameters (random blood sugar, post-prandial blood sugar, HbA1c, and oral glucose tolerance test {OGTT} values). Seven feature selection methodologies were employed to identify optimal predictors from 18 candidate variables. Eleven machine learning algorithms were systematically evaluated, with hyperparameter optimization performed via GridSearchCV (France, Le Chesnay-Rocquencourt: INRIA) using 10-fold stratified cross-validation. Model interpretability was assessed using SHapley Additive exPlanations (SHAP) analysis. Results The Multi-layer Perceptron neural network achieved optimal performance, with an F1-score of 0.7213, an accuracy of 71.7%, and an AUC-ROC of 0.7692 on the independent test set. Feature importance analysis identified early HbA1c as the primary predictor (importance score: 0.405), followed by pre-pregnancy BMI (0.291) and family history of diabetes (0.271). SHAP analysis confirmed these findings, with family history demonstrating the highest mean absolute SHAP value. Clinically actionable thresholds were identified as follows: early RBS ≥125 mg/dL (borderline) and ≥140 mg/dL (concerning); early PPBS ≥160 mg/dL (borderline) and ≥180 mg/dL (concerning); and HbA1c ≥5.7% (intermediate risk), ≥6.0% (high risk), and ≥6.5% (diagnostic). Conclusions First-trimester laboratory parameters, particularly HbA1c combined with clinical risk factors, enable effective early GDM risk stratification with clinically acceptable accuracy. The machine learning framework demonstrates potential for enhancing prenatal screening through personalized risk assessment, though prospective validation in real-world clinical populations is essential before implementation.

Related Concept Videos

Diabetes Mellitus: Type 2 and Gestational01:22

Diabetes Mellitus: Type 2 and Gestational

Type 2 diabetes, characterized by insulin resistance, arises when the insulin receptors on cells lose responsiveness to insulin, diminishing the cell's capacity to take up glucose, resulting in elevated blood glucose levels. To receive a diagnosis of Type 2 diabetes, a series of blood glucose tests are necessary to assess whether the blood glucose falls within normal parameters. If the result is out of the normal range, a patient may be diagnosed as prediabetic or diabetic, depending on the...
5.6K
Pathophysiology of Diabetes01:20

Pathophysiology of Diabetes

Diabetes mellitus is a chronic metabolic disorder characterized by hyperglycemia. The four categories of diabetes are type 1 diabetes, type 2 diabetes, other specific types of diabetes, and gestational diabetes.
Type 1 diabetes is characterized by autoimmune-mediated destruction of pancreatic β cells, with environmental factors potentially triggering this process in genetically susceptible individuals. Despite many not having a family history, certain genes increase susceptibility,...
4.5K
Diabetes: Symptoms, Diagnosis, and Complications01:15

Diabetes: Symptoms, Diagnosis, and Complications

For most patients, experiencing several weeks of polyuria, polydipsia, fatigue, and significant weight loss may indicate the presence of diabetes. Furthermore, adults displaying the phenotypic appearance of type 2 diabetes (particularly those who are obese and not initially insulin-requiring), may have islet cell autoantibodies, suggesting autoimmune-mediated β cell destruction and a diagnosis of latent autoimmune diabetes of adults (LADA). The categorization of glucose homeostasis is...
2.8K