Adverse pregnancy risk prediction system and method based on pre-pregnancy bmi and late pregnancy blood lipids
Patent Information
- Application Number
- CN202611157746.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-11-03
AI Technical Summary
Existing methods for predicting pregnancy risks have failed to effectively quantify the mediating effect between pre-pregnancy BMI and late-pregnancy blood lipids, resulting in insufficient stability and interpretability of the models in small sample data. Furthermore, they have failed to fully utilize the mediating information to guide model training, leading to the implicit fusion of risk-related information and reducing predictive performance.
By constructing a mediation regression model to screen significant mediating variables, calculating the mediation weight adjustment factor, performing clustering and training an improved XGBoost sub-model, and using the mediation weight to weight or constrain feature splitting priority and tree structure selection, data-driven calculation of the mediation effect is achieved.
It improves the stability and interpretability of the model with small sample data, enhances the medical interpretability of the prediction results, and can identify high-risk pregnant women and provide auxiliary reference for risk assessment.
Smart Images

Figure CN123033723A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical and health risk prediction technology, specifically to a system and method for predicting adverse pregnancy risks based on a combination of pre-pregnancy BMI and late-pregnancy blood lipids. Background Technology
[0002] Clinical studies have shown that pre-pregnancy BMI and late-pregnancy blood lipid levels (triglycerides (TG), total cholesterol (TC), high-density lipoprotein cholesterol (HDL-C), and low-density lipoprotein cholesterol (LDL-C)) are closely related to adverse pregnancy outcomes such as gestational diabetes mellitus (GDM), gestational hypertension, premature rupture of membranes, and oligohydramnios. Mediation effect analysis suggests a statistical association between pre-pregnancy BMI and blood lipid indicators, with some indicators (such as TG and TC) potentially serving as important mediators of the impact of BMI on adverse pregnancy outcomes, indicating a statistical mediating pathway of "pre-pregnancy BMI → blood lipids → pregnancy outcome."
[0003] Existing technologies (such as XGBoost and K-means / X-means clustering fusion methods) divide samples into homogeneous subgroups through clustering and then model them separately, which can improve local fitting accuracy. However, the clustering process only relies on the similarity of feature distribution and is not coupled with the mediation weight mechanism in the subsequent modeling stage, so it cannot use mediation information to guide model training.
[0004] Existing methods for predicting pregnancy risks often use pre-pregnancy BMI and late-pregnancy blood lipids as parallel features input into statistical models without quantifying the proportion of the mediating effect between the two. This leads to: ① the statistical correlation between BMI and blood lipid indicators, which may cause some risk-related information to be implicitly fused into the model when directly combined for modeling, thereby reducing the explicit explanatory power of the contribution of the mediating path; ② insufficient model stability and interpretability in small sample clinical data with an uneven proportion of outcomes such as GDM and premature rupture of membranes. Summary of the Invention
[0005] This invention aims to address the shortcomings of existing technologies by providing a method for predicting the risk of adverse pregnancy outcomes that integrates pre-pregnancy body mass index (BMI) and late-pregnancy blood lipid indicators and improves gradient boosting decision tree (XGBoost) based on mediating effect quantification weight.
[0006] To achieve the above objectives, the following technical solution is adopted:
[0007] In a first aspect, the present invention provides a system for predicting adverse pregnancy risks based on a combination of pre-pregnancy body mass index and late-pregnancy blood lipids, comprising:
[0008] The data acquisition module is used to acquire the pregnant woman's basic information and blood lipid indicators in late pregnancy, calculate the pre-pregnancy body mass index (BMI), and label the pregnancy with binary tags according to whether adverse pregnancy outcomes occurred.
[0009] The mediation effect analysis module is used to construct a mediation regression model based on the pre-pregnancy body mass index (BMI), the basic information, and the blood lipid indicators in late pregnancy, calculate the statistical mediation effect ratio of each blood lipid indicator in late pregnancy, screen out the set of significant mediating variables through repeated sampling tests, and calculate the normalized mediation weight adjustment factor.
[0010] The clustering module is used to divide the sample into multiple BMI groups based on the pre-pregnancy BMI classification threshold. Within each BMI group, clustering is further subdivided based on late pregnancy blood lipid indicators and pregnancy weight gain. In the clustering distance calculation, the mediation weight adjustment factor is used to amplify the feature distance of the set of significant mediating variables, forming several homogeneous subgroups.
[0011] The model training module is used to train an improved XGBoost sub-model within each homogeneous subgroup using the mediation weight adjustment factor. During the construction of the improved XGBoost sub-model, the feature splitting priority and tree structure selection are weighted or constrained according to the mediation weight adjustment factor.
[0012] The risk prediction module is used to calculate the pre-pregnancy body mass index (BMI) and determine the clinical group of BMI for a sample of pregnant women to be predicted, based on their basic information and blood lipid indicators in late pregnancy. It then assigns the sample to the corresponding cluster subgroup according to a preset allocation rule and calls the corresponding improved XGBoost sub-model to output the probability and risk classification of adverse pregnancy outcomes.
[0013] Furthermore, the basic information includes pre-pregnancy weight, height, age, parity, delivery, family history, adverse pregnancy history, and gestational weight gain; the blood lipid indicators in late pregnancy include triglycerides, total cholesterol, high-density lipoprotein cholesterol, and low-density lipoprotein cholesterol.
[0014] Furthermore, the mediation effect analysis module constructs the mediation regression model by including:
[0015] Path a regression model: This is used to estimate the effect of pre-pregnancy body mass index (BMI) on each late pregnancy lipid marker.
[0016] Path b logit regression model: This study aims to estimate the combined effects of late-pregnancy lipid markers and pre-pregnancy body mass index (BMI) on adverse pregnancy outcomes.
[0017] Mediation effect Total effect Statistical mediation effect ratio ;in, ;
[0018] in, Let be the measured value of the blood lipid index for the i-th sample. Let BMI be the pre-pregnancy body mass index of the i-th sample. This is a vector of covariates, which includes age, parity, number of deliveries, family history, adverse pregnancy history, and gestational weight gain. , For the intercept term, The regression coefficient for BMI is... This is the direct effect coefficient of BMI. The regression coefficient for blood lipid levels is . , For the covariate coefficient vector, This is the random error term.
[0019] Furthermore, the mediation effect analysis module filters the set of significant mediating variables in the following manner:
[0020] First, examine the regression coefficient of pre-pregnancy body mass index (BMI) on blood lipid indicators in late pregnancy in the regression model of path a. Is it significant? If not significant, then the blood lipid index is excluded from the set of significant mediating variables;
[0021] like Significant and mediating effect With total effect If the signs are the same, then the mediating effect should be further examined. Check if the 95% confidence interval contains 0; if it does, exclude it.
[0022] The remaining blood lipid indicators after the above screening process were included in the set of significant mediating variables.
[0023] Furthermore, the mediation effect analysis module calculates the normalized mediation weight adjustment factor, including:
[0024] The statistical mediation effect proportions of each significant mediating lipid marker were used as the initial weight adjustment factors, i.e. ; As a candidate blood lipid indicator A set of significant mediating variables;
[0025] Then, normalize it according to the following formula to obtain the normalized intermediary weight adjustment factor: ,make The 1 in the denominator is used to reserve the baseline weight share for the direct effect of pre-pregnancy BMI.
[0026] Furthermore, in the clustering module, the feature distance components corresponding to blood lipid indicators belonging to the set of significant mediating variables are multiplied by an amplification factor greater than 1, determined based on the corresponding normalized mediation weight adjustment factor, before participating in the clustering distance calculation. The clustering distance uses weighted Euclidean distance. The distance components of other feature dimensions are not amplified by mediation weights. The amplification factor is... ;
[0027] If the sample size of any sub-cluster formed after clustering within each BMI group is lower than a preset threshold... If the cluster subgroup is still below the preset threshold after merging, the cluster subgroup is removed and the entire BMI group is used directly for subsequent sub-model training.
[0028] Furthermore, in the model training module, the feature splitting priority is weighted according to the mediation weight adjustment factor, including:
[0029] When selecting a splitting feature at each node of the tree, calculate the standard splitting gain for each candidate splitting feature;
[0030] For any blood lipid feature that belongs to the set of significant mediating variables, the normalized mediation weight adjustment factor corresponding to the feature is multiplied by the positive part of the standard split gain and then added to the standard split gain to obtain the ranking score after mediation weight adjustment.
[0031] The splitting priority of each candidate splitting feature is determined based on the ranking score;
[0032] The ranking score does not change the calculation method of the standard split gain or the determination method of the leaf node weights.
[0033] Furthermore, in the model training module, the selection of the tree structure is constrained based on the statistical mediation effect ratio, including:
[0034] During the tree growth process, an evaluation function including a mediation consistency penalty term is calculated for the candidate tree structure. : ,in, The standard classification loss function; The penalty intensity coefficient is preset or optimized during training based on the training set loss curve; Blood lipid indicators The proportion of statistical mediation effect, This is a regularization term for the complexity of a regular tree; For the first Features of trees The actual contribution ratio indicator; For sample index; : No. The true outcome labels of each sample; : No. After rounds of iterations, the model evaluates the samples. The predicted value; : No. Tree samples The predicted contribution value; the tree structure evaluation function does not participate in gradient descent optimization, but is only used for comparison and selection between candidate tree structures.
[0035] Furthermore, in the risk prediction module, the preset allocation rule includes: calculating the distance between the blood lipid characteristics of the pregnant woman sample to be predicted and the centroid of each cluster subgroup, and allocating it to the corresponding cluster subgroup according to the principle of closest distance.
[0036] Secondly, the present invention also provides a method for predicting adverse pregnancy risks based on a combination of pre-pregnancy body mass index and late-pregnancy blood lipids, comprising the following steps:
[0037] S1: Obtain the pregnant woman's basic information and blood lipid indicators in late pregnancy, calculate the pre-pregnancy body mass index (BMI), and label the pregnancy with a binary category label based on whether adverse pregnancy outcomes occur.
[0038] S2: Based on the pre-pregnancy body mass index (BMI), the basic information, and the blood lipid indicators in late pregnancy, a mediation regression model is constructed to calculate the statistical mediation effect ratio of each blood lipid indicator in late pregnancy; a set of significant mediating variables is screened out through repeated sampling test, and the normalized mediation weight adjustment factor is calculated.
[0039] S3: Divide the samples into multiple BMI groups according to the pre-pregnancy BMI classification threshold; within each BMI group, cluster subdivision is performed based on late pregnancy blood lipid index and pregnancy weight gain as features; in the cluster distance calculation, the mediating weight adjustment factor is used to amplify the feature distance belonging to the set of significant mediating variables, forming several homoprotic subgroups.
[0040] S4: Within each homogeneous subgroup, an improved XGBoost sub-model is trained using the mediation weight adjustment factor. During the construction of the improved XGBoost sub-model, the feature splitting priority and tree structure selection are weighted or constrained according to the mediation weight adjustment factor.
[0041] S5: For the sample of pregnant women to be predicted, calculate the pre-pregnancy body mass index (BMI) and determine the clinical group of BMI based on their basic information and blood lipid indicators in late pregnancy. Assign them to the corresponding cluster subgroups according to the preset allocation rules, and call the corresponding improved XGBoost sub-model to output the probability of adverse pregnancy outcomes and risk classification.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] (1) The quantitative results of the mediation effect analysis (bootstrap method) are transformed into weight adjustment factors that can be embedded in the consistency evaluation of XGBoost split ranking scores and tree structure, so as to realize the data-driven calculation of mediation weights and avoid the empirical setting of mediation weight parameters.
[0044] (2) By using BMI clinical grouping and blood lipid characteristics for secondary clustering, the heterogeneity of samples between groups is reduced, and the risk characteristic distribution of samples within each subgroup is more consistent. This helps the XGBoost sub-model to fit the local nonlinear risk law of each subgroup more accurately and avoids the confusion of laws caused by cross-heterogeneous subgroup training.
[0045] (3) The feature contribution of the model output is consistent with the risk association path obtained by statistical mediation analysis, which enhances the medical interpretability of the prediction results, facilitates the identification of high-risk pregnant women with lipid-related risk characteristics, and provides auxiliary reference for clinical risk assessment.
[0046] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of the present invention, nor is it intended to restrict the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0047] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of the invention. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0048] Figure 1 This is a schematic diagram of a module of an adverse pregnancy risk prediction system based on the combination of pre-pregnancy body mass index and late-pregnancy blood lipids according to Embodiment 1 of the present invention.
[0049] Figure 2 This is a schematic diagram of the overall process of an embodiment of the present invention;
[0050] Figure 3 This is a schematic diagram of the working process of the mediation effect analysis module in an embodiment of the present invention;
[0051] Figure 4 This is a schematic diagram of the tree structure evaluation process during the training of the improved XGBoost sub-model in an embodiment of the present invention;
[0052] Figure 5 This is a flowchart of a method for predicting adverse pregnancy risks based on the combination of pre-pregnancy body mass index and late-pregnancy blood lipids in an embodiment of the present invention. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0055] Example 1:
[0056] Figure 1 This is a schematic diagram of a module of an adverse pregnancy risk prediction system based on the combination of pre-pregnancy body mass index and late-pregnancy blood lipids, according to Embodiment 1 of the present invention. Figure 2 This is a schematic diagram of the overall process of an embodiment of the present invention, illustrating the complete steps from data collection, mediation weight calculation, joint clustering, improved model training, to risk classification output. Figure 1 and Figure 2 As shown, a system for predicting adverse pregnancy risks based on a combination of pre-pregnancy body mass index and late-pregnancy blood lipids includes:
[0057] The data acquisition module 110 is used to acquire the basic information of pregnant women and their blood lipid indicators in late pregnancy, calculate the pre-pregnancy body mass index (BMI), and label them with binary tags according to whether adverse pregnancy outcomes occur.
[0058] Specifically, the data acquisition module 110 is used to collect and preprocess data.
[0059] Based on a questionnaire about the pregnant woman's basic information and her electronic medical records, data were collected on her age, pre-pregnancy weight, height, parity, delivery number, family history, history of adverse pregnancy outcomes, gestational weight gain (GWG), and four lipid parameters (triglycerides (TG), total cholesterol (TC), high-density lipoprotein cholesterol (HDL-C), and low-density lipoprotein cholesterol (LDL-C)) from weeks 28 to 30 of gestation. Pre-pregnancy body mass index (BMI) was then calculated.
[0060] ;
[0061] Labels are added according to adverse pregnancy outcomes (GDM, gestational hypertension, premature rupture of membranes, oligohydramnios, and combined adverse pregnancy outcomes, etc.). .
[0062] The mediation effect analysis module 120 is used to construct a mediation regression model based on the pre-pregnancy body mass index (BMI), the basic information, and the blood lipid indicators in late pregnancy, calculate the statistical mediation effect ratio of each blood lipid indicator in late pregnancy, screen out the set of significant mediating variables through repeated sampling tests, and calculate the normalized mediation weight adjustment factor.
[0063] Specifically, the mediation effect analysis module 120 is used to screen mediating variables and calculate weight adjustment factors. For example... Figure 3 The diagram shown is a flowchart of the mediation effect analysis module 120 in this embodiment of the invention, illustrating the complete process from input to generation of a significant mediation set and normalized weights. Specifically:
[0064] For each candidate lipid index ( Construct a two-step mediation regression. Let... The covariate vector includes age, parity, number of deliveries, family history, adverse pregnancy history, and gestational weight gain (GWG):
[0065] (1) Path Regression model:
[0066] ;
[0067] in, For the first The measured values of blood lipid levels for each sample. Let BMI be the pre-pregnancy body mass index of the i-th sample. For the intercept term, The regression coefficient for BMI is... For the covariate coefficient vector, This is the random error term.
[0068] Path α regression model used to estimate the effect of pre-pregnancy body mass index (BMI) on lipid indicators in each late pregnancy. The effect.
[0069] (2) Path blogit model, measured by log-OR ratio:
[0070] ;
[0071] in, For the intercept term, The regression coefficient for blood lipid levels is . This is the direct effect coefficient of BMI. This is the vector of covariate coefficients.
[0072] Path b logit regression model used to estimate blood lipid levels in late pregnancy The combined effect of pre-pregnancy body mass index (BMI) on adverse pregnancy outcomes.
[0073] Mediating (Indirect) Effect :
[0074] ;
[0075] Total effect :
[0076] ;
[0077] Statistical Mediation Effect Proportion :
[0078] ,when and The directions are the same (i.e., the signs are the same) and ;
[0079] in, To stabilize the threshold, the total effect can be taken. A multiple of the standard error of the estimate (e.g., twice) is used to ensure that the total effect is statistically non-zero, avoiding divergence in the proportion value when the total effect is close to zero; if the directions are inconsistent or If the value is too small, the proportion is not calculated; only the significance of the indirect effect is considered. If the calculated value is... If the value exceeds the (0,1) interval, then restrict it to the [0,1] interval, i.e., take... Then, the values are substituted into the normalization formula. In the binary classification scenario, this method uses an approximate mediation effect calculation method based on the logistic model coefficients to obtain a relative quantitative index for adjusting model weights.
[0080] Mediation effect analysis module 120 screens the set of significant mediating variables in the following way: First, it tests the regression coefficient of pre-pregnancy body mass index (BMI) on blood lipid indicators in late pregnancy in the regression model of path a. Is it significant? If not significant, then the blood lipid index is excluded from the set of significant mediating variables; if Significant and mediating effect With total effect If the signs are the same, then the mediating effect should be further examined. We checked whether the 95% confidence interval contained 0; if it did, we excluded those indicators. The remaining blood lipid indicators after the above screening process were then included in the set of significant mediating variables. Specifically:
[0081] Estimation using bootstrap repeated sampling (B=1000) The 95% confidence interval. The testing procedure is standardized as follows: Preliminary testing path. coefficient Whether the mediation is significant serves as an initial screening criterion for mediating variables, reducing subsequent calculations of invalid mediating variables and improving the efficiency of variable screening during model training; if If the result is not significant, it is considered that no stable statistical association has been observed between pre-pregnancy BMI and this lipid index under the current sample conditions. Therefore, according to the conservative screening principle, this index is not included in the set of significant mediating variables, and no further confidence interval testing is required. If the indirect effect is significant and its direction is consistent with the total effect, then further testing is needed. The 95% confidence interval is determined by whether it contains 0; if it does, it is excluded. Therefore, TG and TC are included in the set of significant mediating variables. HDL-C confidence intervals span 0 due to mediation effect, LDL-C confidence intervals span 0 due to path If the coefficient is not significant, it will not be included. .
[0082] Furthermore, the mediation effect analysis module 120 calculates the normalized mediation weight adjustment factor, including: using the statistical mediation effect ratio of each significantly mediating lipid index as the initial weight adjustment factor; and normalizing it according to the following formula to obtain the normalized mediation weight adjustment factor. The details are as follows:
[0083] Define the intermediary weight adjustment factor As an initial weight adjustment factor:
[0084] ;
[0085] Then normalize to obtain the normalized intermediary weight adjustment factor:
[0086] ;
[0087] Normalized The 1 in the denominator is used to reserve the baseline weight share for the direct effect of pre-pregnancy BMI, compressing the weight adjustment factor of significantly mediating lipid indicators into the (0,1) interval, and preventing the sum of mediation weights from exceeding or masking the baseline weight corresponding to the direct effect of BMI. This weight adjustment factor is automatically calculated by data-driven mediation effect proportions, eliminating the need for manual setting of mediation weight parameters and avoiding the subjectivity of empirical assignment.
[0088] The clustering module 130 is used to divide the sample into multiple BMI groups according to the pre-pregnancy BMI classification threshold; within each BMI group, clustering is performed based on the blood lipid index in late pregnancy and the weight gain during pregnancy. In the clustering distance calculation, the mediating weight adjustment factor is used to amplify the feature distance belonging to the set of significant mediating variables, forming several homogeneous subgroups.
[0089] Specifically, the clustering module 130 is used to achieve preconception BMI-blood lipid joint clustering.
[0090] First, the samples were divided into four BMI groups—underweight, normal weight, overweight, and obese—according to a preset pre-pregnancy BMI classification threshold. Then, within each BMI group, K-means clustering was used with (triglycerides (TG), total cholesterol (TC), high-density lipoprotein cholesterol (HDL-C), and low-density lipoprotein cholesterol (LDL-C)) as feature vectors. Based on the elbow rule, the subdivision is further subdivided to form several homoproton groups.
[0091] Furthermore, in the clustering module 130, the feature distance components corresponding to blood lipid indicators belonging to the set of significant mediating variables are multiplied by an amplification factor greater than 1, determined based on the corresponding normalized mediation weight adjustment factor, before participating in the clustering distance calculation. The clustering distance uses a weighted Euclidean distance. The distance components of other feature dimensions are not amplified by mediation weights. The amplification factor is... If the sample size of any sub-cluster formed after clustering within each BMI group is lower than a preset threshold... If the cluster subgroup is still below the preset threshold after merging, the cluster subgroup is removed, and the entire BMI group is used directly for subsequent sub-model training. Specifically:
[0092] To ensure the reasonable influence of blood lipid features on clustering distance, each feature is first standardized using Z-score, resulting in ( To ensure that the mediation weights obtained from the mediation effect analysis module 120 play a guiding role in the clustering stage, the significant mediating lipid features TG and TC are enhanced in the distance calculation (adopting the same design principle as the significant mediation feature gain enhancement in the model training module 140). (Enlarged form), definition of cluster distance as follows:
[0093]
[0094] in, Clustering distance function, used to calculate sample distance With cluster centroid The weighted Euclidean distance between them; TG is the Z-score normalized value; : The value after Z-score standardization; : The LDL-C value after Z-score normalization; : The Z-score normalized value of GWG; : No. The normalized weight adjustment factor for a significant mediating lipid index ( ); TG corresponds to the normalized weight adjustment factor; TC corresponds to the normalized weight adjustment factor; : The coordinates of the cluster centroids on the standardized TG feature dimensions; : The coordinates of the cluster centroids on the standardized TC feature dimensions; : Cluster centroid coordinates on the standardized HDL-C feature dimensions; : Cluster centroid coordinates on the standardized LDL-C feature dimensions; : The coordinates of the cluster centroids on the standardized GWG feature dimensions.
[0095] This allows for assigning higher discriminative weights to significant mediating lipid features during the clustering stage, preventing their contribution from being masked by other features. If the sample size of a subgroup after K-means subdivision is lower than a preset threshold... (If the sample size is insufficient to support stable tree model training), then the subgroup is merged into its nearest neighboring subgroup, or it reverts to no longer subdividing and directly uses the entire BMI group sample to train the submodel, in order to avoid insufficient samples and model instability caused by excessive subdivision. Preset threshold. A pre-defined positive integer used to determine whether the sample size of the cluster subgroup is sufficient to support stable sub-model training.
[0096] Model training module 140 is used to train an improved XGBoost sub-model within each homogeneous subgroup using the mediation weight adjustment factor. During the construction of the improved XGBoost sub-model, the feature splitting priority and tree structure selection are weighted or constrained according to the mediation weight adjustment factor.
[0097] Specifically, the model training module 140 is used to build and train an improved XGBoost sub-model with mediating weights / penalties.
[0098] The improved XGBoost sub-model is trained within each joint subgroup. The weight adjustment factor obtained from the mediation effect analysis module 120 is used. Throughout the clustering distance calculation in module 130 and the split gain ranking and tree structure evaluation of sub-model training within subgroups in module 140, the three stages transfer parameters based on the same statistical mediation effect quantification result, ensuring that both clustering and prediction model training are constrained by the same risk association information. For example... Figure 4 The diagram shown is a flowchart illustrating the tree structure evaluation process during the training of the improved XGBoost sub-model in this embodiment of the invention.
[0099] Furthermore, in model training module 140, the adjustment factor is based on the mediation weight. Weighting the feature splitting priority includes: calculating each candidate splitting feature when selecting a splitting feature at each node of the tree. The standard split gain; for lipid features belonging to the set of significant mediating variables, calculate the ranking score adjusted for mediation weights. ; based on the sorting score Determine the splitting priority of each candidate splitting feature; The calculation method for the standard split gain and the determination method for the leaf node weights remain unchanged. Specifically:
[0100] During the greedy split search phase of the tree, candidate split features are considered. Ranking score adjusted using mediator weights :
[0101] ;
[0102] in, Candidate splitting features during tree splitting; Candidate splitting features The ranking score after adjusting for intermediary weights; Standard XGBoost split gain value, calculated based on the sum of squared gradients of leaf nodes before and after splitting; Candidate splitting features The corresponding actual intermediary weight values are piecewise functions:
[0103]
[0104] The ranking score only changes the priority of candidate splitting features (i.e., it affects the decision of "which feature to select for splitting"), and does not change the gradient statistics of the single split gain itself. The calculation formula does not change the method for calculating the closed-form solution of leaf node weights. Among them, Leaf node The first-order gradient statistic (sum of the first-order gradient of the loss function); Leaf node The second-order gradient statistics (the second-order gradient of the loss function).
[0105] Simultaneously, during the gradient boosting tree iteration process, a mediation consistency evaluation is performed on candidate tree structures that meet the optimization requirements of the conventional loss function. The deviation between the model contribution ratio and the statistical mediation effect ratio is used as an auxiliary evaluation index for candidate tree structure selection. Specifically, during the layer-by-layer growth of the tree, after each layer of splitting, the incremental calculation is based on the currently generated partial tree structure. The algorithm evaluates the penalty term corresponding to the tree structure by substituting it into the tree structure evaluation function; it calculates the evaluation function value for candidate split structures and selects the candidate structure with the better evaluation function value; when no candidate split meets the evaluation conditions, the growth of the current subtree is stopped. This determination is performed after each level of splitting and does not affect the candidate features within a single split. Sorting process.
[0106] In the model training module 140, the selection of tree structure is constrained based on the statistical mediation effect ratio, including: during the tree growth process, calculating an evaluation function for candidate tree structures that includes a mediation consistency penalty term. The tree structure evaluation function is:
[0107] ;
[0108] in, : No. The tree structure evaluation function value of the trees; Standard classification loss function (such as log loss); : No. The true outcome labels of each sample; : No. After rounds of iterations, the model evaluates the samples. The predicted value; : No. Tree samples The predicted contribution value; : Penalty intensity coefficient, used to control the weight of the mediation consistency penalty term in the tree structure evaluation; : A set of significant mediating variables; : No. The regularization term for the normal complexity of the tree is used to prevent overfitting; For the first In the tree and statistical mediating variables The model contribution ratio index corresponding to the feature dimension is used to measure the distribution of feature contributions and the proportion of statistical mediation effects in the model structure. The degree of consistency is defined as follows: Statistical analysis of the first... Tree contains features The set of all nodes that act as split nodes The index is calculated based on the proportion of each node's split gain to the total gain of the tree.
[0109] ;
[0110] in, For the nodes in this tree The standard gain value. The contribution ratio of this model. It is only used to calculate the penalty term in the tree structure evaluation function. It does not participate in the gradient descent optimization process of XGBoost, nor does it participate in gradient calculation. It is only used for screening among multiple candidate tree structures. The penalty intensity coefficient can be pre-defined based on... Initial estimates and the proportion of statistical mediation effects The value range is set; within this initial range, further optimization is performed by combining the training set loss curve.
[0111] ;
[0112] in, This is a regularization term for the complexity of a regular tree. This is a tree complexity penalty parameter that controls the contribution of the number of leaf nodes to the regularization term; This represents the total number of leaf nodes in the tree structure. The L2 regularization parameter controls the strength of the sum of squares penalty for the weights of the leaf nodes; leaf node The weight.
[0113] The tree structure evaluation function The mediator consistency penalty item Its constraint target This refers to the statistical mediation effect ratio of each blood lipid index calculated by the mediation effect analysis module 130, and this statistical mediation effect ratio is also used to calculate the normalized mediation weight adjustment factor. Therefore, the tree structure selection constraints, feature splitting priority weighting, and cluster distance amplification are all based on the same set of statistical mediation effect quantification results (…). This ensures that mediation effect information is consistently transmitted and coordinated across the three stages of clustering, splitting and ranking, and tree structure evaluation. This consistency constraint uses a penalty term to apply the proportion of statistical mediation effects as an auxiliary evaluation criterion for tree structure selection, ensuring that the contribution of significant mediating lipid features in the final model is consistent with the results of statistical mediation analysis.
[0114] Given a tree structure, the optimal weights of leaf nodes are still determined by the standard formula:
[0115] ;
[0116] in, : Leaf nodes under a given tree structure The optimal weight value.
[0117] If a certain adverse pregnancy outcome corresponds to a set of significant mediating variables If the set is empty, this method degenerates into a clustering-XGBoost framework without mediator weight adjustment. (If the penalty term is set to zero, the risk prediction results can still be output normally, but the optimization effect brought by the mediation weight mechanism will not be produced. This is the reasonable degradation boundary of this method in the scenario without significant mediation paths.)
[0118] The risk prediction module 150 is used to calculate the pre-pregnancy body mass index (BMI) and determine the clinical group of BMI for a sample of pregnant women to be predicted, based on their basic information and blood lipid indicators in late pregnancy. It then assigns the sample to the corresponding cluster subgroup according to a preset allocation rule and calls the corresponding improved XGBoost sub-model to output the probability and risk classification of adverse pregnancy outcomes.
[0119] Specifically, the risk prediction module 150 is used for risk prediction and risk classification.
[0120] In the risk prediction module 150, the preset allocation rules include: calculating the distance between the blood lipid characteristics of the pregnant woman sample to be predicted and the centroid of each cluster subgroup, and allocating it to the corresponding cluster subgroup according to the principle of closest distance.
[0121] For newly pregnant women, pre-pregnancy BMI is first calculated and their clinical BMI group is determined. Then, based on their lipid profiles (TG, TC, HDL-C, LDL-C, GUG), they are assigned to corresponding subgroups. After Z-score standardization of each feature (same as in clustering module 130), the nearest subgroup is assigned only within the centroids of several trained subgroups in that group, using the nearest Euclidean distance with mediating weights (the formula is the same as in clustering module 130). The improved XGBoost sub-model for that subgroup outputs the probability of adverse pregnancy outcomes, combined with preset thresholds to output low / medium / high risk classifications and the contribution of each mediating lipid indicator. This probability output does not replace clinical diagnosis and is only used for auxiliary risk assessment.
[0122] Example 2:
[0123] like Figure 5 The diagram shows a flowchart of a method for predicting adverse pregnancy risk based on a combination of pre-pregnancy body mass index (BMI) and late-pregnancy blood lipids, as described in an embodiment of the present invention. This method, applied to the aforementioned adverse pregnancy risk prediction system based on the combination of pre-pregnancy BMI and late-pregnancy blood lipids, includes the following steps:
[0124] S1: Obtain the pregnant woman's basic information and blood lipid indicators in late pregnancy, calculate the pre-pregnancy body mass index (BMI), and label the pregnancy with a binary category label based on whether adverse pregnancy outcomes occur.
[0125] S2: Based on the pre-pregnancy body mass index (BMI), the basic information, and the blood lipid indicators in late pregnancy, a mediation regression model is constructed to calculate the statistical mediation effect ratio of each blood lipid indicator in late pregnancy; a set of significant mediating variables is screened out through repeated sampling test, and the normalized mediation weight adjustment factor is calculated.
[0126] S3: Divide the samples into multiple BMI groups according to the pre-pregnancy BMI classification threshold; within each BMI group, cluster subdivision is performed based on late pregnancy blood lipid index and pregnancy weight gain as features; in the cluster distance calculation, the mediating weight adjustment factor is used to amplify the feature distance belonging to the set of significant mediating variables, forming several homoprotic subgroups.
[0127] S4: Within each homogeneous subgroup, an improved XGBoost sub-model is trained using the mediation weight adjustment factor. During the construction of the improved XGBoost sub-model, the feature splitting priority and tree structure selection are weighted or constrained according to the mediation weight adjustment factor.
[0128] S5: For the sample of pregnant women to be predicted, calculate the pre-pregnancy body mass index (BMI) and determine the clinical group of BMI based on their basic information and blood lipid indicators in late pregnancy. Assign them to the corresponding cluster subgroups according to the preset allocation rules, and call the corresponding improved XGBoost sub-model to output the probability of adverse pregnancy outcomes and risk classification.
[0129] Example 3:
[0130] The following examples illustrate the implementation process of this method. The statistical parameters are only an example of experimental configuration and do not limit the data range and parameter values of this invention.
[0131] A clinical cohort was used as the validation sample, including several singleton pregnancies, with gestational diabetes mellitus (GDM) as the target outcome for model validation. In this validation sample, TG and TC showed high statistical mediating contributions (e.g., approximately 19.2% and 15.2%, respectively), HDL-C's mediating effect confidence interval crossed 0 (not significant), and LDL-C showed no significant association with pre-pregnancy BMI (pathway). coefficient Therefore After normalization , .
[0132] Based on pre-pregnancy BMI, the groups were divided into four subgroups, and blood lipids were clustered using K-means clustering (each group was further subdivided into 2-3 subgroups). (Set to 30) Train the improved XGBoost sub-model separately, with age, parity, adverse pregnancy history, and GWG as covariate inputs, and whether GDM occurred as the label. The initial interval is based on initial value and The magnitude is set to 0.1~0.3, and further optimized within this range using the training set loss curve.
[0133] The model outputs the probability and risk stratification of gestational diabetes mellitus (GDM) for each pregnant woman, and can be extended in the same way to re-estimate and model the mediating weights for outcomes such as gestational hypertension and premature rupture of membranes; if a certain outcome corresponds to If it is an empty set, it will automatically degenerate into the standard clustering process—XGBoost.
[0134] In summary, this invention proposes a system and method for predicting adverse pregnancy risks based on the combination of pre-pregnancy body mass index and late-pregnancy blood lipids. By quantifying the mediating effect weights and deeply integrating them with the XGBoost model, it achieves effective prediction of adverse pregnancy outcome risks under limited sample conditions.
[0135] The above description is only a preferred embodiment of the present invention and is used only to explain the present invention. It is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0136] It should also be noted that, in the embodiments of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0137] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in the embodiments of this application may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown in this application, but is to be accorded the widest scope consistent with the principles and novel features disclosed in the embodiments of this application.
Claims
1. A system for predicting adverse pregnancy risks based on a combination of pre-pregnancy body mass index and late-pregnancy blood lipids, characterized in that, include: The data acquisition module is used to acquire the pregnant woman's basic information and blood lipid indicators in late pregnancy, calculate the pre-pregnancy body mass index (BMI), and label the pregnancy with binary tags according to whether adverse pregnancy outcomes occurred. The mediation effect analysis module is used to construct a mediation regression model based on the pre-pregnancy body mass index (BMI), the basic information, and the blood lipid indicators in late pregnancy, calculate the statistical mediation effect ratio of each blood lipid indicator in late pregnancy, screen out the set of significant mediating variables through repeated sampling tests, and calculate the normalized mediation weight adjustment factor. The clustering module is used to divide the sample into multiple BMI groups based on the pre-pregnancy BMI classification threshold. Within each BMI group, clustering is further subdivided based on late pregnancy blood lipid indicators and pregnancy weight gain. In the clustering distance calculation, the mediation weight adjustment factor is used to amplify the feature distance of the set of significant mediating variables, forming several homogeneous subgroups. The model training module is used to train an improved XGBoost sub-model within each homogeneous subgroup using the mediation weight adjustment factor. During the construction of the improved XGBoost sub-model, the feature splitting priority and tree structure selection are weighted or constrained according to the mediation weight adjustment factor. The risk prediction module is used to calculate the pre-pregnancy body mass index (BMI) and determine the clinical group of BMI for a sample of pregnant women to be predicted, based on their basic information and blood lipid indicators in late pregnancy. It then assigns the sample to the corresponding cluster subgroup according to a preset allocation rule and calls the corresponding improved XGBoost sub-model to output the probability and risk classification of adverse pregnancy outcomes.
2. The system according to claim 1, characterized in that, The basic information includes pre-pregnancy weight, height, age, parity, delivery, family history, adverse pregnancy history, and gestational weight gain; the blood lipid indicators in late pregnancy include triglycerides, total cholesterol, high-density lipoprotein cholesterol, and low-density lipoprotein cholesterol.
3. The system according to claim 1, characterized in that, The mediation effect analysis module constructs a mediation regression model including: Path a regression model: This is used to estimate the effect of pre-pregnancy body mass index (BMI) on each late pregnancy lipid marker. Path b logit regression model: This study aims to estimate the combined effects of late-pregnancy lipid markers and pre-pregnancy body mass index (BMI) on adverse pregnancy outcomes. Mediation effect Total effect Statistical mediation effect ratio ;in, ; in, Let be the measured value of the blood lipid index for the i-th sample. Let BMI be the pre-pregnancy body mass index of the i-th sample. This is a vector of covariates, which includes age, parity, number of deliveries, family history, adverse pregnancy history, and gestational weight gain. , For the intercept term, The regression coefficient for BMI is... This is the direct effect coefficient of BMI. The regression coefficient for blood lipid levels is . , For the covariate coefficient vector, This is the random error term.
4. The system according to claim 3, characterized in that, The mediation effect analysis module filters the set of significant mediating variables using the following methods: First, examine the regression coefficient of pre-pregnancy body mass index (BMI) on blood lipid indicators in late pregnancy in the regression model of path a. Is it significant? If not significant, then the blood lipid index is excluded from the set of significant mediating variables; like Significant and mediating effect With total effect If the signs are the same, then the mediating effect should be further examined. Check if the 95% confidence interval contains 0; if it does, exclude it. The remaining blood lipid indicators after the above screening process were included in the set of significant mediating variables.
5. The system according to claim 4, characterized in that, The mediation effect analysis module calculates the normalized mediation weight adjustment factor, including: The statistical mediation effect proportions of each significant mediating lipid marker were used as the initial weight adjustment factors, i.e. ; As a candidate blood lipid indicator A set of significant mediating variables; Then, normalize it according to the following formula to obtain the normalized intermediary weight adjustment factor: ,make The 1 in the denominator is used to reserve the baseline weight share for the direct effect of pre-pregnancy BMI.
6. The system according to claim 5, characterized in that, In the clustering module, the feature distance components corresponding to blood lipid indicators belonging to the set of significant mediating variables are multiplied by an amplification factor greater than 1, determined based on the corresponding normalized mediation weight adjustment factor, before participating in the clustering distance calculation. The clustering distance uses weighted Euclidean distance. Distance components of other feature dimensions are not amplified by mediation weights. The amplification factor is... ; If the sample size of any sub-cluster formed after clustering within each BMI group is lower than a preset threshold... If the cluster subgroup is still below the preset threshold after merging, the cluster subgroup is removed and the entire BMI group is used directly for subsequent sub-model training.
7. The system according to claim 1, characterized in that, In the model training module, the feature splitting priority is weighted according to the mediation weight adjustment factor, including: When selecting a splitting feature at each node of the tree, calculate the standard splitting gain for each candidate splitting feature; For any blood lipid feature that belongs to the set of significant mediating variables, the normalized mediation weight adjustment factor corresponding to the feature is multiplied by the positive part of the standard split gain and then added to the standard split gain to obtain the ranking score after mediation weight adjustment. The splitting priority of each candidate splitting feature is determined based on the ranking score; The ranking score does not change the calculation method of the standard split gain or the determination method of the leaf node weights.
8. The system according to claim 5, characterized in that, In the model training module, the selection of the tree structure is constrained based on the statistical mediation effect ratio, including: During the tree growth process, an evaluation function including a mediation consistency penalty term is calculated for the candidate tree structure. : ; in, The standard classification loss function; The penalty intensity coefficient is preset or optimized during training based on the training set loss curve; Blood lipid indicators The proportion of statistical mediation effect, This is a regularization term for the complexity of a regular tree; For the first Features of trees The actual contribution ratio indicator; For sample index; : No. The true outcome labels of each sample; : No. After rounds of iterations, the model evaluates the samples. The predicted value; : No. Tree samples The predicted contribution value; The tree structure evaluation function does not participate in gradient descent optimization; it is only used for comparison and selection among candidate tree structures.
9. The system according to claim 1, characterized in that, In the risk prediction module, the preset allocation rule includes: calculating the weighted Euclidean distance between the blood lipid characteristics of the pregnant woman sample to be predicted and the centroid of each cluster subgroup, and allocating it to the corresponding cluster subgroup according to the principle of closest distance.
10. A method for predicting adverse pregnancy risk based on a combination of pre-pregnancy body mass index and late-pregnancy blood lipids, characterized in that, Includes the following steps: S1: Obtain the pregnant woman's basic information and blood lipid indicators in late pregnancy, calculate the pre-pregnancy body mass index (BMI), and label the pregnancy with a binary category label based on whether adverse pregnancy outcomes occur. S2: Based on the pre-pregnancy body mass index (BMI), the basic information, and the blood lipid indicators in late pregnancy, a mediation regression model is constructed to calculate the statistical mediation effect ratio of each blood lipid indicator in late pregnancy; a set of significant mediating variables is screened out through repeated sampling test, and the normalized mediation weight adjustment factor is calculated. S3: Divide the samples into multiple BMI groups according to the pre-pregnancy BMI classification threshold; within each BMI group, cluster subdivision is performed based on late pregnancy blood lipid index and pregnancy weight gain as features; in the cluster distance calculation, the mediating weight adjustment factor is used to amplify the feature distance belonging to the set of significant mediating variables, forming several homoprotic subgroups. S4: Within each homogeneous subgroup, an improved XGBoost sub-model is trained using the mediation weight adjustment factor. During the construction of the improved XGBoost sub-model, the feature splitting priority and tree structure selection are weighted or constrained according to the mediation weight adjustment factor. S5: For the sample of pregnant women to be predicted, calculate the pre-pregnancy body mass index (BMI) and determine the clinical group of BMI based on their basic information and blood lipid indicators in late pregnancy. Assign them to the corresponding cluster subgroups according to the preset allocation rules, and call the corresponding improved XGBoost sub-model to output the probability of adverse pregnancy outcomes and risk classification.
