A system and method for predicting adverse glycemic trajectories in gestational diabetes mellitus
By constructing the LightGBM model using machine learning methods and combining GBMTM and SHAP interpretation, the accuracy and interpretability issues of gestational diabetes mellitus (GDM) trajectory prediction were resolved. This enabled accurate prediction and personalized interpretation of GDM GDM trajectories, improving the clinical applicability of glycemic management.
Patent Information
- Application Number
- CN202611203854.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-11-03
AI Technical Summary
Existing technologies struggle to accurately predict the glycemic control trajectory after a diagnosis of gestational diabetes mellitus (GDM). Traditional models are unable to capture complex nonlinear relationships, resulting in limited guidance for glycemic management, and existing models lack interpretability.
Using a machine learning-based approach, the LightGBM model is constructed through data acquisition and preprocessing, feature selection, multi-trajectory modeling, prediction model construction and optimization, quadruple validation, and SHAP interpretation. By combining GBMTM and SHAP methods, the prediction and interpretation of adverse blood glucose trajectories during pregnancy can be achieved.
It achieves accurate prediction of blood glucose trajectory in gestational diabetes mellitus, provides global feature importance ranking and individualized interpretation, improves the interpretability and clinical applicability of the model, and ensures the model's generalization ability and prediction accuracy.
Smart Images

Figure CN123033694A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical artificial intelligence and clinical decision support technology, specifically to a system and method for predicting adverse blood glucose trajectories in gestational diabetes mellitus. Background Technology
[0002] Gestational diabetes mellitus (GDM) refers to abnormal glucose metabolism that occurs or is first diagnosed during pregnancy, and it is one of the most common metabolic complications of pregnancy worldwide. According to the International Diabetes Federation, GDM currently affects approximately 14.0% of pregnancies globally, with a particularly high prevalence in Asian populations. After a GDM diagnosis, although most patients can achieve some level of glycemic control through medical nutrition therapy, lifestyle interventions, and self-monitoring of blood glucose, a significant proportion still experience persistent fasting or postprandial hyperglycemia. Epidemiological data shows that in a large US cohort, only about 39.3% of GDM patients maintain a "stable optimal" glycemic trajectory, and approximately 15%–30% eventually require drug treatment.
[0003] Adverse glycemic trajectories (SGT) are significantly associated with a variety of adverse perinatal outcomes, including preeclampsia, cesarean section, macrosomia, and neonatal hypoglycemia. Furthermore, patients with poorly controlled gestational diabetes mellitus (GDM) have a nearly 10-fold increased risk of developing type 2 diabetes within 5 to 10 years postpartum. Therefore, accurately predicting the subsequent glycemic control trajectory at the time of GDM diagnosis (usually between 24 and 28 weeks of gestation) is of significant clinical value for timely and intensive interventions, developing individualized follow-up plans, rationally allocating medical resources, and ultimately improving maternal and infant outcomes.
[0004] However, the measures currently being taken have at least the following problems: 1) Predictive targets deviate from clinical management needs. Most existing GDM prediction models focus on the early diagnosis of GDM itself (i.e., predicting "whether GDM will develop") or long-term postpartum outcomes (such as the risk of developing postpartum type 2 diabetes), rather than the glycemic control trajectory after a GDM diagnosis. While diagnostic models have some value in prenatal screening, their guidance on glycemic management after a GDM diagnosis is limited. Although drug therapy need prediction models partially answer the question of "whether medication is needed," medication need is not equivalent to the overall glycemic trajectory—many patients who do not need medication still have uncontrolled blood glucose levels.
[0005] 2) Traditional statistical methods struggle to capture complex nonlinear relationships. Existing prediction models often employ traditional logistic regression, which fails to adequately capture the complex nonlinear interactions between multiple dimensions of factors, including demographic characteristics, anthropometric indicators, metabolic indicators, and inflammatory markers. Glucose regulation involves the combined effects of multiple pathways, such as insulin resistance, β-cell function, lipid metabolism, and inflammatory responses, resulting in highly complex relationships between variables. Traditional regression methods have limited fitting capabilities. Summary of the Invention
[0006] To address the above problems, the purpose of this invention is to provide a system and method for predicting adverse blood glucose trajectories in gestational diabetes.
[0007] This was achieved through the following technical solutions: A machine learning-based method for predicting adverse blood glucose trajectories during pregnancy includes the following steps: S1. Data Acquisition and Preprocessing: Baseline data of pregnant women with gestational diabetes mellitus at the time of diagnosis were collected, outlier handling was performed on continuous variables, and missing values were filled using multiple imputation methods. S2. Blood glucose trajectory modeling and outcome definition: Based on the baseline data from step S1, a population-based multi-trajectory model is used to identify potential blood glucose trajectory subgroups and classify them into adverse blood glucose trajectories and optimal blood glucose trajectories. S3. Feature Screening: Key features for predicting adverse blood glucose trajectories are screened from candidate variables using minimum absolute contraction and selection operator regression. S4. Predictive Model Construction and Optimization: Multiple machine learning algorithms are used to construct predictive models. The hyperparameters of each model are optimized through cross-validation. The performance of each model is compared using multi-dimensional evaluation metrics, and the model with the best performance is selected as the final predictive model. S5. Quadruple Validation of Predictive Model: The performance of the constructed predictive model is evaluated. S6. Model Interpretation: The SHapley Additive exPlanations method is used to quantify the contribution of each feature to the model prediction, and output the global feature importance ranking and individualized prediction interpretation. S7. Risk Stratification: Patients are classified into different risk levels based on the quantiles of the predicted probabilities from the training set.
[0008] Optionally, in step S1, the baseline data includes, but is not limited to: age, parity, height, pre-pregnancy weight, current weight, body fat percentage, fasting blood glucose, blood glucose 1 hour after oral glucose tolerance test, blood glucose 2 hours after oral glucose tolerance test, glycated hemoglobin, and triglycerides.
[0009] Optionally, it also includes: step S7, risk stratification: classifying patients into different risk levels based on the quantiles of the predicted probabilities from the training set.
[0010] Optionally, in step S2, the population-based multi-trajectory model uses a quadratic polynomial function of time as the trajectory shape function. The optimal number of groups is selected using the Akaike information criterion and the Bayesian information criterion, overcoming the incomplete information deficiency of traditional single-index trajectory analysis and more comprehensively reflecting the overall glycemic control of GDM patients. Based on the clinical control thresholds of FBG ≥ 5.1 mmol / L and / or 2h-PBG ≥ 6.7 mmol / L, the five trajectories are divided into poor glycemic trajectories and optimal glycemic trajectories. The clinical characteristics of the five trajectories include: high-glycemic-hyperglycemic type, fasting hyperglycemic type, postprandial borderline type, safe-glycemic type, and low-glycemic-hyperglycemic type. This step overcomes the incomplete information deficiency of traditional single-index trajectory analysis and more comprehensively reflects the overall glycemic control of GDM patients.
[0011] Optionally, in step S3, the minimum absolute shrinkage and selection operator regression employ 10-fold cross-validation and the 1-SE rule to select the optimal penalty parameter λ.
[0012] Optionally, in step S4, a variety of machine learning algorithms include at least two of Logistic Regression, Decision Tree, Random Forest, Extreme Gradient Boosting, Lightweight Gradient Boosting Machine, K-Nearest Neighbors, Support Vector Machine, and Neural Network.
[0013] Optionally, in step S4, the multi-dimensional evaluation metrics include: area under the curve, sensitivity, specificity, positive predictive value, negative predictive value, accuracy, F1 score, Brier score, expected calibration error, and log loss.
[0014] Optionally, in step S6, the SHAP method includes: a SHAP summary bar chart, a SHAP summary scatter plot, a SHAP dependency graph, and a SHAP waterfall plot. The SHAP method provides global feature importance ranking and individualized prediction interpretation.
[0015] Optionally, in step S4, the final prediction model is the LightGBM model.
[0016] Optionally, in step S7, the risk level includes three groups: low risk, medium risk, and high risk, and the division is based on the ternary probabilities of the training set prediction.
[0017] The beneficial effects of this invention compared to the prior art are: 1) Rigorous validation system with four-fold strategy to ensure generalization ability. This invention adopts a four-fold validation strategy: internal validation (random splitting within the same center), time validation (different time periods within the same center), external validation (different medical institutions), and prospective validation (prospective independent cohort). This is one of the most comprehensive studies in the field of GDM prediction, which fully guarantees the model's generalization ability and clinical applicability.
[0018] 2) Scientific trajectory definition using dual-indicator joint modeling. This invention uses GBMTM to perform dual-indicator joint modeling of fasting blood glucose and 2-hour postprandial blood glucose, overcoming the shortcomings of incomplete information in traditional single-indicator trajectory analysis, and more comprehensively reflecting the overall blood glucose control of GDM patients.
[0019] 3) High interpretability, overcoming the "black box" bottleneck. This invention uses the SHAP method to provide global feature importance ranking and individualized prediction interpretation. The SHAP dependency graph determines the risk thresholds for each continuous variable (such as FBG>5.38mmol / L, HbA1c>5.50%, pre-pregnancy BMI>27.09kg / m², age>35 years, etc.), enabling clinicians to understand the basis for each prediction result and significantly improving the clinical acceptability of the model. Attached Figure Description
[0020] Figure 1 This is a flowchart of the method for predicting adverse blood glucose trajectories in GDM according to the present invention; Figure 2 This is a schematic diagram of five blood glucose trajectory patterns identified by GBMTM according to the present invention; Figure 3 The chart shows the ROC curves of the eight machine learning models of this invention in internal validation, time validation, external validation, and prospective validation. Figure 4 This is a heatmap of variables used by the LightGBM model to predict SGT in an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the global feature importance ranking and individualized interpretation based on SHAP according to the present invention. Detailed Implementation
[0021] The technical solutions in the embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0022] This invention discloses a machine learning-based method for predicting adverse blood glucose trajectories during pregnancy. For example... Figure 1 The flowchart shown below illustrates the method for predicting adverse blood glucose trajectories in GDM according to the present invention, which includes the following steps: S1. Data Acquisition and Preprocessing: Baseline data of pregnant women with gestational diabetes mellitus (GDM) at diagnosis (24-28 weeks of gestation) were collected, including demographic characteristics, anthropometric indicators, and laboratory indicators. Outlier handling was performed on continuous variables (tailing was performed using a threshold of 1.5 times the interquartile range), and missing values were imputed using a training set-based multiple imputation method (MICE algorithm, 5 imputations). The 24-28 week gestation population was chosen because the WHO, ADA, and the Chinese Medical Association's Perinatal Medicine Branch all define 24-28 weeks as the universal gestational age for OGTT screening. The diagnostic thresholds for this time period (fasting ≥5.1, 1h ≥10, 2h ≥8.5 mmol / L) have been validated in a large population, with balanced diagnostic sensitivity and specificity, and the results are uniformly comparable, facilitating standardized comparisons of multicenter clinical studies and medical record data. The MICE algorithm is a well-known multivariate missing value imputation method in this field, and its specific calculation process will not be elaborated further.
[0023] Demographic and clinical indicators included: age, height, pre-pregnancy weight, weight at diagnosis, parity, and whether assisted reproductive technology (ART) was used. Body fat percentage (BFP) was measured using a nutritional analyzer (model NQA-P3H, Beijing Sihai Huachen Technology Co., Ltd.) via bioelectrical impedance analysis, and the results were expressed as a percentage of total body weight.
[0024] Laboratory indicators include complete blood count, four lipid profiles, liver function indicators, kidney function indicators, lactate dehydrogenase (LDH), ferritin (FER), thyroid function, and blood glucose-related indicators. Complete blood count (CBC) includes: white blood cells (WBC), neutrophils (NEUT), lymphocytes (LYMPH), monocytes (MONO), platelets (PLT), and hemoglobin (Hb); lipid profile includes: total cholesterol (TC), triglycerides (TG), high-density lipoprotein (HDL), and low-density lipoprotein (LDL); liver function indicators include: total protein (TP), albumin (ALB), alanine aminotransferase (ALT), aspartate aminotransferase (AST), alkaline phosphatase (ALP), gamma-glutamyl transferase (GGT), total bilirubin (TBIL), direct bilirubin (DBIL), and total bile acids (TBA); kidney function indicators include: creatinine (Cr), urea (UREA), and uric acid (UA); lactate dehydrogenase (LDH) and ferritin (FER); thyroid function indicators include: thyroid-stimulating hormone (TSH), free thyroxine (FT4), and anti-thyroid peroxidase antibody (TPOAb); blood glucose-related indicators include: fasting blood glucose (FBG) and oral glucose tolerance test (OGTT). 2-hour blood glucose, 2-hour blood glucose via OGTT, and glycated hemoglobin (HbA1c).
[0025] Derived parameters are calculated from basic indicators: pre-pregnancy body mass index (BMI) (kg / m²) is calculated based on pre-pregnancy height and weight; gestational weight gain (GW, kg) is current weight minus pre-pregnancy weight.
[0026] Based on the above original indicators, several derived indices were calculated, including inflammation / immunity-related ratios and lipid-derived indicators. Specifically, inflammation / immunity-related ratios included: neutrophil-lymphocyte ratio (NLR), derived neutrophil-lymphocyte ratio (dNLR), monocyte-lymphocyte ratio (MLR), neutrophil-monocyte / lymphocyte ratio (NMLR), systemic inflammatory response index (SIRI), systemic immune inflammatory index (SII), neutrophil / high-density lipoprotein ratio (NHR), monocyte / high-density lipoprotein ratio (MHR), lymphocyte / high-density lipoprotein ratio (LHR), platelet / high-density lipoprotein ratio (PHR), and systemic inflammation composite index (AISI). Lipid-derived indicators included: triglyceride / high-density lipoprotein ratio and non-high-density lipoprotein cholesterol.
[0027] Outliers for continuous variables are defined as data exceeding 1.5 times the interquartile range. Outliers are uniformly replaced with the corresponding upper and lower bounds of the interquartile range. In a specific implementation, all data were collected, and the data completeness rate for fasting blood glucose and 2-hour postprandial finger-prick blood glucose at weeks 28-30, 31-33, 34-36, and 37-39 of gestation ranged from 81.3% to 98.4%. The data completeness was lowest at weeks 37-39 of gestation because some pregnant women had already delivered before the planned testing. Continuous variables are expressed as mean (standard deviation), and categorical variables are expressed as number of cases (percentage). Except for parity, all other parameters are continuous variables.
[0028] For missing values, a multiple imputation method was used. Five imputation datasets were generated using the MICE package in R language to handle missing values. The imputation model was built only on the training set and then directly applied to the time-series validation set, external validation set, and prospective cohort. All laboratory test indicators were retained as continuous variables. Variables with skewed distributions, such as uric acid, lactate dehydrogenase, hemoglobin, platelets, systemic immune inflammation index, platelet-to-density lipoprotein ratio, and systemic inflammation composite index, underwent logarithmic transformation, and the transformed variables were included in the candidate feature pool.
[0029] S2. Blood glucose trajectory modeling and outcome definition: Based on multiple longitudinal measurements of fasting blood glucose (FBG) and 2-hour postprandial capillary blood glucose (2h-PBG) after GDM diagnosis, a group-based multi-trajectory model (GBMTM) was used to identify potential blood glucose trajectory subgroups. Fasting blood glucose and 2-hour postprandial fingertip blood glucose were both included as time-series repeated measurements in the modeling. The trajectory curves were fitted using a time quadratic polynomial to achieve the optimal balance between model fitting effect and simplicity. Trajectory models with 1 to 5 groups were constructed sequentially. The selection criteria for the prediction model were: selecting the grouping scheme with the lowest Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC), while satisfying four constraints: (1) the average posterior probability (AvePP) of each group is >0.70 (the commonly accepted cutoff value for excellent grouping); (2) the correct classification ratio (OCC) is >5; (3) the proportion of each group in the total cases is not less than 5%; (4) the blood glucose change curves of each group are clinically interpretable. Based on the above criteria, five trajectory models were finally determined.
[0030] Specifically, the five trajectory models include: high-glucose-and-hyperglycemic type, fasting hyperglycemic type, postprandial borderline type, dual-safety type, and dual-low type; the clinical characteristics of the five trajectory models are as follows: Dual-High Pattern: Both FBG and 2-hour postprandial blood glucose are persistently elevated, with FBG around 5.57–5.60 mmol / L and 2-hour postprandial blood glucose around 7.11–7.65 mmol / L; Fasting-High Pattern: FBG is persistently high (around 5.17–5.21 mmol / L), while postprandial blood glucose is generally within the normal range (around 6.32–6.40 mmol / L); Postprandial-Borderline Pattern: FBG is normal (around 4.62–4.80 mmol / L), while postprandial blood glucose is borderline high (around 6.65–7.08 mmol / L); Dual-Safe Pattern: Both FBG and postprandial blood glucose are stable within the normal range; Dual-Low Pattern: Both FBG and postprandial blood glucose are at low levels.
[0031] Based on clinical control thresholds (FBG ≥ 5.1 mmol / L or 2h-PBG ≥ 6.7 mmol / L), the dual-hyperglycemic type and fasting hyperglycemic type were defined as adverse glycemic trajectories (SGT), while the other three groups were defined as optimal glycemic trajectories (OGT).
[0032] S3. Feature Selection: Least Absolute Contraction and Selection Operator (LASSO) regression is used to select key features for predicting adverse blood glucose trajectories from candidate variables. Specifically, univariate logistic regression analysis is performed on the training set to screen candidate variables related to SGT (P<0.05). Least Absolute Contraction and Selection Operator (LASSO) regression is used, employing 10-fold cross-validation (i.e., 10 rounds) and the 1-SE rule to select the optimal penalty parameter λ, thus selecting a subset of key features for predicting SGT from the candidate variables, ensuring model simplicity. Multicollinearity is tested on the selected features; a VIF > 5.0 indicates a serious multicollinearity problem, reducing the risk of model overfitting. The feature selection algorithm incorporates L1 regularization, compressing the coefficients of unimportant variables to near zero, simultaneously completing variable selection and reducing the risk of model overfitting. The LASSO regression algorithm is run using R software to perform feature selection on the original variable set; this feature selection method is existing technology and will not be described here.
[0033] Among them, after LASSO regression screening, 10 predictive variables with non-zero coefficients were retained and used as the 10 key features for the final predictive model. These are all clinical indicators that are routinely available at the time of GDM diagnosis (24 to 28 weeks of gestation), as shown in the table below: Serial Number Feature Name Data types How to obtain Clinical significance 1 age Continuous Medical history taking Advanced maternal age is associated with a higher risk of GDM. 2 Parity Binary classification (0 vs. ≥1) Medical history taking Multiparous women have a higher risk of GDM 3 Preconception BMI Continuous type (kg / m²) Pre-pregnancy weight / height 2 Reflects pre-pregnancy nutritional and metabolic status 4 Body fat percentage (BFP) Continuous type (%) Bioelectrical impedance analysis Directly reflects body fat content 5 Weight gain during pregnancy (GWG) Continuous type (kg) Current weight - Pre-pregnancy weight Reflects the energy balance during pregnancy 6 Triglycerides (TG) Continuous (mmol / L) Blood lipid test Reflects lipid metabolism status 7 Fasting blood glucose (FBG) Continuous (mmol / L) Venous blood biochemistry test Reflects basal insulin secretion 8 OGTT 1h blood glucose Continuous (mmol / L) 75g OGTT Reflects the early response after glucose load 9 OGTT 2h blood glucose Continuous (mmol / L) 75g OGTT Reflects late clearance after glucose load 10 Glycated hemoglobin (HbA1c) Continuous type (%) High performance liquid chromatography Reflecting average blood glucose levels over the past 2–3 months S4. Predictive Model Construction and Comparison: Multiple machine learning algorithms are used to construct predictive models. The hyperparameters of each model are optimized through cross-validation. The performance of each model is compared using multi-dimensional evaluation metrics. The model with the best performance is selected as the final predictive model. The final predictive model is the LightGBM model.
[0034] Specifically, multiple machine learning algorithms are used to construct predictive models. These algorithms include at least two of the following: Logistic Regression, Decision Tree, Random Forest, Extreme Gradient Boosting (XGBoost), Lightweight Gradient Boosting Machine (LightGBM), K-Nearest Neighbors (KNN), Support Vector Machine (SVM), and Neural Network (NNET). The hyperparameters of each model are optimized using grid search combined with 10-fold cross-validation. The performance of the predictive models is comprehensively evaluated using multi-dimensional metrics such as Area Under the Curve (AUC), sensitivity, specificity, positive predicted value, negative predicted value, accuracy, F1 score, Brier score, expected calibration error (ECE), and log-loss.
[0035] Furthermore, the performance of the predictive models was comprehensively evaluated from the following dimensions: Discriminative power: using the area under the receiver operating characteristic (AUC) and its 95% confidence interval, sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), accuracy, and F1 score. Calibration: using the Spiegelhalter Z-test (P>0.05 indicates good calibration), expected calibration error (ECE, lower is better, <0.1 is acceptable), and Brier score (closer to 0 is better). Prediction error: using log-loss; the lower the log-loss value, the smaller the prediction error. Comparison of predictive models: using the DeLong test to compare AUC differences; using IDI and NRI to assess model performance improvement; using FDR correction to control the false discovery rate of multiple comparisons. Clinical utility: using decision curve analysis (DCA) to assess net clinical benefit at different threshold probabilities.
[0036] This example compares eight machine learning algorithms: Logistic Regression (LR, R language glm function), Decision Tree (DT, rpart package, cp=0.002), Random Forest (RF, ranger package, mtry=4, min.node.size=15, ntree=600), Extreme Gradient Boosting (XGBoost, xgbTree package, eta=0.05, max_depth=5, gamma=0.1, colsample_bytree=0.8, nrounds=122), and Lightweight Gradient Boosting Machine (LightGBM, lightgbm package, num_leaves=1). The LightGBM prediction model was developed using the caret package (version 7.0-1) in R (version 4.4.2). Hyperparameter optimization was performed using grid search combined with 10-fold cross-validation. The parameters used were: max_depth=5, learning_rate=0.05, lambda_l1=0.5, lambda_l2=1, feature_fraction=0.7, min_data_in_leaf=30, nrounds=262). The model employed K-Nearest Neighbors (KNN, kknn package, kmax=17, kerne="gaussian"), Support Vector Machine (SVM, svmRadial package, gamma=0.1, cost=1), and Neural Network (NNET, nnet package, 4 hidden nodes, stepmax=1e6, threshold=0.01).
[0037] S5. Quadruple Validation of Predictive Models: The constructed predictive models are evaluated sequentially on internal validation sets (randomly split within the same center), time-based validation sets (different time periods within the same center), external validation sets (different medical institutions), and prospective validation sets (prospectively collected independent cohorts). The differences in AUC between different models are compared using the nonparametric test (DeLong test). The Integrated Discriminant Improvement Index (IDI) and Net Reclassification Improvement Index (NRI) are used to assess the improvement in model performance. The clinical net benefit of the model is evaluated using decision curve analysis (DCA).
[0038] In the specific study of this application, the total sample size of the four datasets was 12,232 cases, including: 8,375 cases in the training / internal validation set (Campus A, 2022-2024), 2,433 cases in the time validation set (Campus A, 2025), 1,152 cases in the external validation set (Hospitals B and C, 2025), and 272 cases in the prospective cohort (Campus A, January-March 2026). The vast majority of baseline indicators showed no statistically significant differences in distribution among the groups (most P > 0.05). After the eight machine learning algorithm prediction models in step S4 were trained on the training set, their performance was evaluated sequentially on the internal validation set, time validation set, external validation set, and prospective validation set. The performance results of the LightGBM model are shown in the table below: Validation set AUC (95% CI) Sensitivity Specificity PPV NPV accuracy Brier ECE training set 0.968(0.965–0.972) 0.882 0.915 0.865 0.926 0.902 0.071 0.037 Internal validation 0.936(0.927–0.945) 0.882 0.915 0.865 0.926 0.902 0.100 0.019 Time verification 0.919(0.909–0.929) 0.804 0.848 0.751 0.884 0.832 0.112 0.027 External verification 0.873(0.853–0.893) 0.766 0.807 0.693 0.858 0.792 0.143 0.064 Forward-looking verification 0.941(0.915–0.966) 0.821 0.892 0.753 0.925 0.871 0.092 0.068 The results show that the percentages of SGT in the four datasets are as follows: internal validation set 38.3% (3210 / 8375), time validation set 36.3% (884 / 2433), external validation set 36.3% (418 / 1152), and prospective cohort 28.7% (78 / 272).
[0039] The DeLong test showed that there was no statistically significant difference in AUC between LightGBM and XGBoost in any of the validation sets (P>0.05 after FDR correction); LightGBM's AUC was significantly better than Logistic Regression, Decision Tree, Random Forest, Support Vector Machine, K Nearest Neighbors and Neural Network (P<0.05 after FDR correction).
[0040] IDI and NRI analyses further confirmed that LightGBM had a significant improvement in discrimination on the training set compared with Logistic Regression, Decision Tree, Support Vector Machine and Neural Network (IDI: 0.049–0.109, P<0.001 after FDR correction; NRI: 0.039–0.115, P<0.001 after FDR correction).
[0041] Decision curve analysis shows that the LightGBM model has net clinical benefit across multiple threshold probability ranges and outperforms most candidate models.
[0042] In the prospective cohort, the actual incidence rates of SGT in the low, medium, and high risk groups, divided according to the ternary probabilities predicted in the training set, were 0.0%, 20.4%, and 81.2%, respectively (trend P<0.001), confirming the effectiveness of risk stratification.
[0043] S6. Quantitative Explanation of Individualized Predictions: The SHapley Additive exPlanations (SHAP) method is used to quantify the contribution of each feature to the model's predictions. The SHAP method includes: SHAP summary bar chart, SHAP summary scatter plot, SHAP dependency graph, and SHAP waterfall plot.
[0044] Machine learning models possess black-box characteristics, thus necessitating interpretability analysis. Therefore, the SHAP method is employed. Based on a game theory framework, this method quantifies the contribution of each feature and enables interpretation of single-sample prediction results. SHAP can output both a global ranking of feature importance and provide individualized prediction interpretations, thereby improving model transparency and facilitating clinical interpretation. Figure 5 The diagram illustrates the global feature importance ranking and individualized interpretation based on SHAP (including SHAP summary bar chart, SHAP summary scatter plot, SHAP waterfall plot, and SHAP dependency plot). The global feature importance ranking is provided by descending order of the absolute mean value of SHAP values; the influence direction of each feature is shown through the SHAP summary scatter plot; the SHAP dependency plot determines the risk threshold for each continuous variable that biases the prediction towards SGT; and the SHAP waterfall plot provides individualized interpretation for each patient. The risk thresholds include: FBG > 5.38 mmol / L, HbA1c > 5.50%, OGTT_2h blood glucose > 8.61 mmol / L, OGTT_1h blood glucose > 10.20 mmol / L, pre-pregnancy BMI > 27.09 kg / m², age > 35 years, TG > 3.24 mmol / L, GUG > 11.80 kg, BFP > 36.80%, and parity ≥ 1 (positive contribution).
[0045] like Figure 5 As shown in Figure A, this is a summary bar chart of SHAP: features are sorted in descending order of their absolute SHAP values, visually demonstrating the contribution of each feature to the model's prediction results. For example... Figure 5 As shown in B, this is a scatter plot summarizing SHAP: the higher the SHAP feature value, the higher the probability of the subject having abnormal blood glucose trajectory (SGT); orange scatter points correspond to high feature values, purple scatter points correspond to low feature values, and the degree of vertical stacking of scatter points reflects the sample data density of the corresponding interval.
[0046] Personalized interpretation can be achieved by using a SHAP waterfall plot to show a single patient the specific contribution (positive or negative) of each feature to the predicted outcome. For example... Figure 5 As shown in Figure C, this is a SHAP waterfall plot of a single pregnant woman based on the LGBM model: orange bars represent features that positively contribute to the model's predictions, while purple bars represent features that negatively inhibit them. The vertical axis lists each clinical feature involved in the model's predictions and the corresponding actual test values for a specific pregnant woman, including: fasting blood glucose 5.11 mmol / L, age 26 years, 2-hour blood glucose in the oral glucose tolerance test 8.62 mmol / L, pre-pregnancy body mass index 24 kg / m², 1-hour blood glucose in the oral glucose tolerance test 11 mmol / L, and glycated hemoglobin 5.1%. The data shows that the patient's triglyceride level was 2.95 mmol / L, gestational weight gain was 6.1 kg, parity was 0 (i.e., first delivery), and body fat percentage was 31.6%. Each vertical axis is paired with the positive and negative SHAP contribution values on the horizontal bars, which can intuitively correspond to the positive or negative increase or decrease in the predicted probability of abnormal blood glucose trajectory (SGT) for this sample. In addition, by combining the global baseline prediction value E[f(x)]=0.373 and the final prediction score f(x)=0.389 after superimposing the contributions of all features, we can fully interpret the specific values, influence directions, and contribution strength of each clinical feature in this case in the model prediction. Furthermore, the top four features and their corresponding SAP values can be viewed as follows: fasting blood glucose (FBG, +0.0734), age (-0.0733), 2-hour post-oral glucose tolerance test (OGTT_2h glucose, +0.0392), and prepregnancy BMI (+0.0355). The model's predicted output value for this sample is 0.389, and the model's baseline contribution value is 0.373.
[0047] like Figure 5 Figure D shows the SHAP dependency graph: each graph presents the influence of a single feature on the model's predicted output, with each point representing a pregnant woman sample. Taking fasting blood glucose as an example, when the fasting blood glucose level is higher than 5.38 mmol / L, the model's judgment is more inclined towards the abnormal glucose trajectory (SGT) category, and positive SHAP values all increase the predictive tendency for adverse SGT outcomes. Arranged in descending order of the absolute value of the mean SHAP value, the top five most important global features are: fasting blood glucose (FBG), glycated hemoglobin (HbA1c), 2-hour OGTT blood glucose, 1-hour OGTT blood glucose, and pre-pregnancy BMI.
[0048] S7. Risk Stratification: Patients are divided into low-risk, intermediate-risk, and high-risk groups based on the ternary stratification threshold of the predicted probabilities from the training set. It's worth noting that, according to blood glucose control standards, gestational blood glucose trajectories are divided into two categories: adverse blood glucose trajectories and well-controlled trajectories. This application focuses on adverse blood glucose trajectories. Finally, the prediction model outputs the probability of an adverse blood glucose trajectory, and based on this probability, pregnant women are classified into low, intermediate, and high risk levels for management. Ultimately, the LightGBM model is deployed as a Python-based web application, allowing users to input actual values for 11 features (Note: Pre-pregnancy BMI and GWG values are automatically calculated based on the input height, pre-pregnancy weight, and current weight). The application then generates risk predictions for SGT in women with GDM. Based on the predicted risk, patients are divided into low, intermediate, or high-risk groups. Through expert discussion, corresponding medical recommendations are developed for different risk levels and displayed on the webpage. The application can be accessed via the following link: http: / / www.hellogdm.online.
[0049] The specific usage process is as follows: The user inputs 10 clinical indicators (age, parity, height, pre-pregnancy weight, current weight, BFP, FBG, OGTT 1h blood glucose, OGTT 2h blood glucose, HbA1c, TG). The system automatically calculates pre-pregnancy BMI and GUG, calls the LightGBM model to calculate the SGT prediction probability, and automatically classifies the risk level according to the ternary threshold into: low risk, medium risk, and high risk, and outputs corresponding management suggestions, specifically: Low risk: Maintain a healthy lifestyle, a balanced diet and moderate exercise; have routine prenatal checkups every 2 to 3 weeks until 36 weeks, and then weekly after 36 weeks; maintain healthy weight gain (no more than 500g per week); monitor changes in blood sugar and blood lipids.
[0050] Medium risk: Refer to a nutrition clinic to develop an individualized medical nutrition treatment plan; adjust dietary structure and reduce the intake of refined sugar and refined carbohydrates; engage in at least 150 minutes of moderate-intensity exercise per week if there are no contraindications to exercise; have regular follow-up visits to the nutrition clinic and monitor blood glucose; have regular obstetric clinic visits to monitor fetal development and changes in blood lipids, blood pressure, amniotic fluid, etc.; learn about GDM to improve self-management ability; if blood glucose is still not up to standard after dietary and exercise intervention, consider using medical foods under the guidance of a nutritionist.
[0051] High risk: Immediately refer to a nutrition clinic to develop an individualized treatment plan; strictly control diet while ensuring fetal nutrition; appropriately increase exercise (at least 150 minutes of moderate-intensity exercise per week) when there are no contraindications; regularly monitor blood glucose and record it in detail, and have regular follow-up visits with the nutrition and obstetrics departments; if blood glucose still does not reach the target after dietary and exercise interventions, use medical foods under the guidance of a nutritionist; if necessary, start drug treatment as prescribed by a doctor.
[0052] The solutions corresponding to the three different risk levels mentioned above can be pre-set by medical staff and are not included in the technical protection content of this solution. Only exemplary solutions are given below.
[0053] In one specific embodiment, a multicenter retrospective-prospective study design was adopted. Data sources included electronic medical records of pregnant women with GDM from Campus A (2022-2026) and Campus B (2025) of the Affiliated Maternal and Child Health Hospital of D University (D City Maternal and Child Health Hospital) and the F City Maternal and Child Health Hospital (2025). The inclusion criteria were: (1) age 18 to 50 years; (2) diagnosed with GDM by a 75g oral glucose tolerance test (OGTT) at 24 to 28 weeks of gestation, with diagnostic criteria referring to the International Association for Diabetes and Pregnancy Study (IADPSG) criteria: FBG ≥ 5.1 mmol / L, or 1-hour blood glucose ≥ 10.0 mmol / L, or 2-hour blood glucose ≥ 8.5 mmol / L; (3) regular prenatal check-ups until delivery; (4) receiving medical nutrition therapy; (5) at least three fasting blood glucose and three 2-hour postprandial capillary blood glucose measurements after the diagnosis of GDM, with each measurement interval greater than 2 weeks. The data exclusion criteria were: (1) pre-gestational diabetes; (2) multiple pregnancy; (3) missing baseline or biochemical laboratory data; and (4) use of oral hypoglycemic agents (such as glibenclamide, metformin) or insulin. After data set partitioning, a total of 12,232 pregnant women were finally included. Among them, 8,375 pregnant women from Campus A of the Affiliated Maternity Hospital of D University from 2022 to 2024 were randomly divided into a training set (5,863 women) and an internal validation set (2,512 women) in a 7:3 ratio; 2,433 pregnant women from Campus A in 2025 were used as the time validation set; 1,152 pregnant women from Hospital B (668 women) and Hospital C (484 women) were used as the external validation set; and 272 pregnant women prospectively collected from Campus A from January to March 2026 were used as the prospective validation set.
[0054] Longitudinal tracking was performed on fasting blood glucose (venous blood, measured by an AU5800 fully automated biochemical analyzer) and 2-hour postprandial capillary blood glucose (measured by a StatStrip blood glucose meter) after GDM diagnosis. Records were taken every two weeks at 28-30 weeks, 31-33 weeks, 34-36 weeks, and 37-39 weeks of gestation.
[0055] GBMTM was used to jointly model two indicators: fasting blood glucose and 2-hour postprandial blood glucose. The time function was represented in quadratic polynomial form, such as... Figure 2The diagram illustrates five blood glucose trajectory patterns identified by GBMTM based on this invention. One to five trajectory models were fitted, including: high-both-high pattern, fasting high pattern, postprandial borderline pattern, dual-safety pattern, and dual-low pattern. The optimal number of groups was selected by comparing information criteria such as AIC and BIC. Based on the prediction model screening criteria, five models were ultimately determined as the optimal solutions (AIC=146792.7, BIC=147215.0). The mean posterior probability (AvePP) for each group ranged from 0.851 to 0.942 (all greater than the threshold of 0.7), the correct classification ratio (OCC) ranged from 15.433 to 104.346 (all greater than 5), and the sample proportion of each group exceeded 5%.
[0056] The results of the quadruple validation of the prediction model, such as Figure 3 The figure shows a comparison of ROC curves for the eight machine learning models of this invention in internal validation, time validation, external validation, and prospective validation. The horizontal axis represents 1-specificity, and the vertical axis represents sensitivity. Internal validation results show differences in the performance of each model (e.g., Figure 3 (A) This confirms the advantages of the gradient boosting algorithm. The LGBM and XGB models performed robustly, with AUCs of 0.936 (95% CI: 0.927–0.945) and 0.935 (95% CI: 0.926–0.944), respectively. LGBM showed good calibration (ECE=0.019; Spiegelhalter Z-test P=0.103), while XGB showed moderate calibration (ECE=0.028; Spiegelhalter Z-test P=0.020). The K-nearest neighbor model showed the most significant performance degradation between the training set and the internal validation set, with the AUC decreasing from 0.975 to 0.915 (a decrease of Δ=-0.060), suggesting potential overfitting. Traditional models (logistic regression, support vector machine) showed stable performance (AUC: 0.922–0.924) and good calibration (Spiegelhalter P: 0.507–0.517). Tree models without a boosting framework (decision trees, random forests) have similar or lower AUC levels (0.886~0.921) and poorer calibration performance (ECE: 0.045~0.067), further demonstrating the superiority of the integrated gradient boosting algorithm.
[0057] Figure 3 The Chinese text includes English terms and their definitions: AUC is the area under the receiver operating characteristic curve; LR represents logistic regression; DT represents decision tree; RF represents random forest; XGB represents extreme gradient boosting algorithm; LGBM represents lightweight gradient boosting machine; KNN represents K-nearest neighbors algorithm; SVM represents support vector machine; and NNET represents neural network.
[0058] Temporal generalization validation was conducted using data from different time periods (2025) within the same medical institution (e.g., Figure 3 B). LGBM and XGB still demonstrate the best discriminative performance (AUC: 0.918~0.919), but their performance declines to some extent compared to the training set (ΔAUC for both models is -0.049). LGBM exhibits excellent calibration performance (ECE=0.027; Brill score=0.112), with the lowest Brill score among all models. The performance of the KNN model continues to decline, with the AUC dropping to 0.901 (95% CI: 0.889~0.913), and the log loss increasing to 0.515. Traditional models (logistic regression, support vector machine) show better temporal stability (ΔAUC=-0.021), but their overall AUC is relatively low (0.902~0.908), indicating that although the gradient boosting model experiences some performance degradation in the time dimension, its discriminative ability remains superior.
[0059] External validation was conducted using data from two independent medical institutions, and all models exhibited the expected performance degradation (e.g., Figure 3 (C) This reflects the challenge of model generalization across medical scenarios. XGB and LGBM achieved the highest AUC (both 0.873, 95% CI: 0.853–0.893); decision tree had the lowest AUC (0.833, 95% CI: 0.809–0.857). All models showed poor calibration performance during external validation (Spiegelhalter P < 0.001), indicating significant institution-specific effects.
[0060] Prospective validation results such as Figure 3 As shown in D, the XGB model had the highest AUC (0.942, 95% CI: 0.917–0.968), followed closely by LGBM (0.941, 95% CI: 0.915–0.966). However, LGBM demonstrated superior clinical value: higher accuracy (0.871 vs 0.857), better calibration (ECE: 0.068 vs 0.080; Brill score: 0.092 vs 0.099), and lower logarithmic loss (0.285 vs 0.305). LGBM maintained high sensitivity (0.821) and specificity (0.892), with a negative predictive value of 0.925, making it particularly suitable for clinical screening scenarios. The population was divided into three risk groups, with SGT incidence rates of 0.0%, 20.4%, and 81.2% in the low, medium, and high risk groups, respectively (trend P < 0.001), confirming that the LGBM model can achieve effective risk stratification in a real clinical setting.
[0061] Univariate logistic regression analysis was performed on the training set to screen out variables that were significantly associated with SGT from 44 candidate variables (P<0.05). Candidate variables include demographic characteristics (age, parity, ART use, etc.), anthropometry indicators (height, pre-pregnancy weight, current weight, pre-pregnancy BMI, BFP, GWG, etc.), complete blood count indicators (WBC, NEUT, LYMPH, MONO, PLT, Hb, etc.), lipid indicators (TC, TG, HDL, LDL, etc.), liver function indicators (TP, ALB, ALT, AST, ALP, GGT, TBIL, DBIL, TBA, etc.), kidney function indicators (Cr, UREA, UA, etc.), other biochemical indicators (LDH, FER, etc.), thyroid function indicators (TSH, FT4, TPOAb, etc.), blood glucose indicators (FBG, OGTT_1h, OGTT_2h, HbA1c), inflammation-immune related ratios (NLR, dNLR, MLR, NMLR, SIRI, SII, NHR, MHR, LHR, PHR, AISI), and lipid-related indices (TG / HDL ratio, non-HDL cholesterol).
[0062] LASSO regression (10-fold cross-validation, λ value selection using the 1-SE rule) was then used for variable selection. Ten predictor variables with non-zero coefficients were ultimately retained: age, parity, pre-pregnancy BMI, BFP, GUG, TG, FBG, OGTT 1h blood glucose, OGTT 2h blood glucose, and HbA1c. The variance inflation factor (VIF) ranged from 1.07 to 2.63, well below the threshold of 5.0, indicating no severe multicollinearity among the selected variables. Figure 4 The image shows a heatmap of variables used by the LightGBM model to predict SGT in an embodiment of this invention, visually demonstrating the performance of the LGBM model in predicting SGT values in GDM. The heatmap shows the distribution of actual values for each predictor across different female individuals, as well as the model-predicted SGT probability versus the actual results. Actual values include: dataset, outcome label, model-predicted value, age (years), triglycerides (mmol / L), 1-hour blood glucose from the oral glucose tolerance test (mmol / L), 2-hour blood glucose from the oral glucose tolerance test (mmol / L), fasting blood glucose (mmol / L), parity (0 / ≥1), body fat percentage (percentage), glycated hemoglobin (percentage), pre-pregnancy body mass index (kg / m²), and gestational weight gain (kg). The dataset includes: training set, internal validation set, time validation set, external validation set, and prospective cohort. Outcome labels include: normal blood glucose trajectory group and abnormal blood glucose trajectory group.
[0063] exist Figure 4In the dataset, the data types are categorized as follows: red for model training, cyan for internal validation, orange for time-based validation, purple for external validation, and green for a prospective cohort. Outcome labels are divided into two categories: yellow (OGT) and dark purple (SGT) for gestational glucose abnormalities. The corresponding detection standards for each indicator are as follows: model predicted values range from 0 to 1; the age range for included subjects is 18 to 50 years; the triglyceride (TG) detection range is 0.62–15.95 mmol / L; the 1-hour oral glucose tolerance test (OGTT_1h glucose) detection range is 4.64–15.54 mmol / L; and the 2-hour oral glucose tolerance test (OGTT_2h glucose) detection range is... The range for glucose testing is 3.25–15 mmol / L; the range for fasting blood glucose (FBG) testing is 2.9–7.57 mmol / L; the parity determination criteria are light blue for 0 deliveries and dark blue for ≥1 delivery; the range for body fat percentage (BFP) testing is 14.2%–52.83%; the range for glycated hemoglobin (HbA1c) testing is 3.4%–8.5%; the range for pre-pregnancy body mass index (Pre-pregnancy BMI) testing is 14.57–45.2 kg / m²; and the range for gestational weight gain (GWG) testing is -15.9 kg to 29.5 kg.
[0064] The study observed that the model effectively distinguishes between high-risk and low-risk GDM patients, demonstrating consistent performance across all five datasets. These findings indicate that the LGBM type exhibits good predictive accuracy and generalization ability in SGT prediction, suggesting that this model may aid in the early clinical identification of high-risk GDM patients. Based on the ternary probabilities predicted in the training set, low / intermediate / high-risk groups were categorized, and the actual SGT incidence rates in the prospective cohort were 0.0%, 20.4%, and 81.2%, respectively (trend P < 0.001).
[0065] Figure 4The following are the English terms and their definitions: Dataset: dataset; Outcome: outcome label; Prediction: model prediction; Age (years): age (years); TG (mmol / L): triglycerides (mmol / L); OGTT_1h glucose (mmol / L): blood glucose 1 hour after oral glucose tolerance test (mmol / L); OGTT_2h glucose (mmol / L): blood glucose 2 hours after oral glucose tolerance test (mmol / L); FBG (mmol / L): fasting blood glucose (mmol / L); Parity (0 / ≥1): parity (0 times / ≥1 times); BFP (%): body fat percentage (percentage); HbA1c (%): glycated hemoglobin (percentage); Pre-pregnancy BMI (kg / m²): pre-pregnancy body mass index (kg / m²); GWG (kg): weight gain during pregnancy (kg); Training set: training set; Internal validation set: internal validation set; Time validation set: time validation set; External validation set: external validation set. `set` is the external validation set, `Prospective cohort` is the prospective cohort; `OGT` represents the normal blood glucose trajectory group, and `SGT` represents the abnormal blood glucose trajectory group.
[0066] Finally, the LightGBM model was deployed as a Python web application (https: / / www.hellogdm.online). After inputting 10 indicators, it automatically calculates the SGT probability and risk level, and outputs individualized management suggestions (low risk: routine management; medium risk: nutrition clinic + individualized plan + intensive follow-up; high risk: immediate intensive intervention + regular monitoring + medication when necessary). For example, a 28-year-old primiparous woman (parity = 0), height 162cm, pre-pregnancy weight 63kg, current weight 69.1kg (24 weeks of pregnancy), BFP 33%, FBG 5.11 mmol / L, OGTT 1h blood glucose 11.0mmol / L, OGTT 2h blood glucose 8.62mmol / L, HbA1c 5.1%, TG 2.95mmol / L. The system calculated: pre-pregnancy BMI = 63 / (1.62)² = 24.0kg / m², GWG = 69.1−63 = 6.1kg. Therefore, the model outputs the SGT prediction probability, classifying it as medium risk. The system recommends: referral to a nutrition clinic for an individualized medical nutrition treatment plan; dietary adjustments; at least 150 minutes of moderate-intensity exercise per week; and regular blood glucose monitoring and follow-up.
[0067] Based on the above system, this invention discloses a machine learning-based system for predicting adverse blood glucose trajectories during pregnancy, comprising: a data acquisition module, a trajectory definition module, a feature engineering module, a model training and optimization module, a model validation module, a prediction interpretation module, a risk stratification module, a clinical decision support module, and an online interaction module.
[0068] Data acquisition module: used to acquire baseline data of pregnant women with GDM at the time of diagnosis. The baseline data includes age, parity, height, pre-pregnancy weight, current weight, body fat percentage (BFP), fasting blood glucose (FBG), 1-hour blood glucose of oral glucose tolerance test (OGTT), 2-hour blood glucose of OGTT, glycated hemoglobin (HbA1c), and triglycerides (TG). Trajectory definition module: Used to construct blood glucose trajectory based on fasting blood glucose and 2-hour postprandial capillary blood glucose data from multiple longitudinal measurements after GDM diagnosis, and to identify and define SGT outcome; Feature engineering module: used for outlier detection and processing, continuous variable transformation, multiple imputation of missing values, and feature selection based on LASSO regression for raw data; Model training and optimization module: used to build prediction models on the training set using various machine learning algorithms, optimize the hyperparameters of each model through grid search and cross-validation, compare the performance of each model with multi-dimensional evaluation metrics, and select LightGBM as the final prediction model; Model validation module: Used to systematically evaluate the performance of the final model on internal validation sets, time validation sets, external validation sets, and prospective validation sets; Prediction and Interpretation Module: Used to calculate the SHAP value of each feature based on the SHAP method, providing global feature importance ranking and individualized prediction and interpretation; Risk stratification module: used to automatically classify patients into three levels—low risk, medium risk, and high risk—based on the predicted probabilities output by the model and the ternary threshold of the training set; Clinical decision support module: used to automatically output corresponding individualized management recommendations based on risk level, including medical nutrition therapy plans, exercise intervention plans, blood glucose monitoring frequency and drug intervention indications; Online interaction module: Used to receive clinical indicator data input by users through web pages or mobile applications, call the predictive model to calculate the risk probability of SGT, and return the prediction results, risk level and corresponding management suggestions.
[0069] The application method and beneficial effects of this system can be found in the description of the previous method for predicting adverse blood glucose trajectories in gestational diabetes, and will not be repeated here.
[0070] In summary, this invention provides a system and method for predicting adverse glycemic trajectories (SGTs) in gestational diabetes mellitus (GDM). It collects baseline data from pregnant women diagnosed with GDM; employs a population-based multi-trajectory model (GBMTM) to jointly model fasting blood glucose and 2-hour postprandial capillary blood glucose, identifying and defining SGT outcomes; uses LASSO regression to select 10 key features from 44 candidate variables; constructs a prediction model using the LightGBM algorithm, rigorously evaluating it through a four-pronged strategy: internal validation (AUC=0.936), time validation (AUC=0.919), external validation (AUC=0.873), and prospective validation (AUC=0.941); uses the SHAP method to provide global feature importance ranking and individualized predictive interpretation; and categorizes patients into low, medium, and high-risk groups based on predicted probabilities, outputting individualized clinical management recommendations. This invention also provides an online prediction platform deployed on a web browser, allowing users to obtain SGT risk probabilities and management recommendations in real time by inputting 11 routine clinical indicators. This invention enables early identification, precise risk stratification, and individualized intervention guidance for adverse blood glucose trajectories in GDM, demonstrating good clinical applicability and promotional value, and representing significant progress.
[0071] The above embodiments are merely illustrative of the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solutions based on the technical concept proposed in this invention shall fall within the scope of protection of this invention.
Claims
1. A machine learning-based method for predicting adverse blood glucose trajectories during pregnancy, characterized in that, Includes the following steps: S1. Data Acquisition and Preprocessing: Baseline data of pregnant women with gestational diabetes mellitus at the time of diagnosis were collected, outlier handling was performed on continuous variables, and missing values were filled using multiple imputation methods. S2. Blood glucose trajectory modeling and outcome definition: Based on the baseline data from step S1, a population-based multi-trajectory model is used to identify potential blood glucose trajectory subgroups and classify them into adverse blood glucose trajectories and optimal blood glucose trajectories. S3. Feature Screening: Key features for predicting adverse blood glucose trajectories are screened from candidate variables using minimum absolute contraction and selection operator regression. S4. Predictive Model Construction and Optimization: Multiple machine learning algorithms are used to construct predictive models. The hyperparameters of each model are optimized through cross-validation. The performance of each model is compared using multi-dimensional evaluation metrics, and the model with the best performance is selected as the final predictive model. S5. Quadruple Validation of Predictive Model: The performance of the constructed predictive model is evaluated; the quadruple validation includes: internal validation set, time validation set, external validation set, and prospective validation set. S6. Model Interpretation: The SHapley Additive exPlanations method is used to quantify the contribution of each feature to the model prediction, and outputs the global feature importance ranking and individualized prediction interpretation.
2. The method for predicting adverse blood glucose trajectories during pregnancy based on machine learning according to claim 1, characterized in that, In step S1, the baseline data shall include at least: age, parity, height, pre-pregnancy weight, current weight, body fat percentage, fasting blood glucose, blood glucose 1 hour after oral glucose tolerance test, blood glucose 2 hours after oral glucose tolerance test, glycated hemoglobin, and triglycerides.
3. The method for predicting adverse blood glucose trajectories during pregnancy based on machine learning according to claim 1, characterized in that, It also includes: Step S7, risk stratification: patients are divided into different risk levels based on the quantiles of the predicted probabilities from the training set.
4. The method for predicting adverse blood glucose trajectories during pregnancy based on machine learning according to claim 1, characterized in that, In step S2, the population-based multi-trajectory model uses a time quadratic polynomial function as the trajectory shape function, and selects the optimal number of groups using the Akaike information criterion and the Bayesian information criterion. Based on the clinical control thresholds FBG ≥ 5.1 mmol / L and / or 2h-PBG ≥ 6.7 mmol / L, the five trajectories are divided into adverse blood glucose trajectories and optimal blood glucose trajectories. The clinical characteristics of the five trajectories include: high blood glucose and low fasting blood glucose, high fasting blood glucose, borderline postprandial blood glucose, safe blood glucose and low fasting blood glucose, and low fasting blood glucose and low fasting blood glucose.
5. The method for predicting adverse blood glucose trajectories during pregnancy based on machine learning according to claim 1, characterized in that, In step S3, the minimum absolute shrinkage and selection operator regression use 10-fold cross-validation and the 1-SE rule to select the optimal penalty parameter λ.
6. The method for predicting adverse blood glucose trajectories during pregnancy based on machine learning according to claim 1, characterized in that, In step S4, a variety of machine learning algorithms are used, including at least two of Logistic Regression, Decision Tree, Random Forest, Extreme Gradient Boosting, Lightweight Gradient Boosting Machine, K-Nearest Neighbors, Support Vector Machine, and Neural Network.
7. The method for predicting adverse blood glucose trajectories during pregnancy based on machine learning according to claim 1, characterized in that, In step S4, the multi-dimensional evaluation metrics include: area under the curve, sensitivity, specificity, positive predictive value, negative predictive value, accuracy, F1 score, Brier score, expected calibration error, and log loss.
8. The method for predicting adverse blood glucose trajectories during pregnancy based on machine learning according to claim 1, characterized in that, In step S6, the SHAP method includes: SHAP summary bar chart, SHAP summary scatter plot, SHAP dependency graph, and SHAP waterfall plot.
9. A method for predicting adverse blood glucose trajectories during pregnancy based on machine learning according to claim 1, characterized in that, In step S4, the final prediction model is the LightGBM model.
10. A method for predicting adverse blood glucose trajectories during pregnancy based on machine learning according to claim 3, characterized in that, In step S7, the risk levels are divided into three groups: low risk, medium risk, and high risk, based on the ternary probabilities of the training set.
