Abstract
Background
Group B Streptococcus (GBS) is a key pathogen in perinatal health. This study aimed to develop and internally validate a risk prediction model for positive reproductive tract GBS screening in late-pregnancy women using routinely collected clinical data.
Methods
This single-center retrospective study included 363 late-pregnancy women who underwent combined vaginal-rectal GBS screening from January 2023 to May 2024. Data were split 7:3 into training (n = 254) and validation (n = 109) sets using stratified sampling. Predictive variables were selected using least absolute shrinkage and selection operator (LASSO) regression combined with the Boruta algorithm. Seven machine learning models were developed in the training set. Model performance was evaluated using the area under the receiver operating characteristic curve (AUC), accuracy, sensitivity, specificity, F1 score, Brier score, calibration curves, and decision curve analysis.
Results
The GBS positivity rate was 25.1% (91/363). Feature selection identified seven predictors: education level, platelet count, lymphocyte count, vaginitis type, abnormal vaginal discharge, gestational thyroid disease, and gestational weight gain. The random forest model showed the best performance in the validation set, achieving an AUC of 0.868 (95% CI: 0.811–0.922) and a Brier score of 0.153.
Conclusions
The random forest model, built from routinely available clinical data, demonstrated relatively favorable discrimination and calibration in internal validation for predicting positive GBS screening in late pregnancy. It may offer potential for risk stratification and screening adherence management, but it should not replace standard microbiological testing or clinical judgment. Multicenter prospective validation is required before clinical application.
Supplementary Information
The online version contains supplementary material available at https://doi.org/10.1186/s12884-026-09661-6.
Keywords: Late pregnancy, Group B Streptococcus, Positive GBS screening, Machine learning, Random forest, SHAP
Introduction
Group B Streptococcus (GBS), clinically termed Streptococcus agalactiae, ranks among the key opportunistic pathogens encountered during the perinatal timeframe [1]. This bacterium is capable of colonizing the gastrointestinal and reproductive systems of expectant mothers and is significantly linked to negative outcomes for both mothers and their newborns [2]. Recent global burden estimates indicate that in 2020, around 19.7 million pregnant women globally experienced rectovaginal colonization by GBS [3]. GBS-related diseases also continue to contribute to a substantial burden of invasive infant infections, deaths, neurodevelopmental impairment, maternal infections, and stillbirths, indicating that GBS remains an important public health concern in maternal and child health care [3, 4].
Colonization of GBS during pregnancy is frequently without symptoms. Nonetheless, a mother’s carriage of GBS in either the reproductive or gastrointestinal tract is a crucial factor for the occurrence of early-onset GBS disease in neonates [2]. Current research indicates that women who test positive for GBS screening might transmit the bacteria to their newborns during childbirth, and certain newborns exposed to the bacteria could later experience serious infections like sepsis, pneumonia, or meningitis [5]. In addition to neonatal outcomes, GBS has been associated with maternal complications, including asymptomatic bacteriuria, urinary tract infection, chorioamnionitis, postpartum endometritis, and bacteremia [5, 6]. It should be emphasized that GBS colonization or positive screening is not equivalent to clinical infection or intrauterine infection, and these entities should be distinguished in terms of diagnostic criteria and clinical implications [2].
Currently, many nations advise conducting GBS screening during the later stages of pregnancy and administering intrapartum antibiotic prophylaxis as essential measures to mitigate the risk of early-onset GBS disease in newborns [2]. The American College of Obstetricians and Gynecologists suggests that universal GBS screening should occur between 36 0/7 and 37 6/7 weeks of gestation, along with intrapartum antibiotic prophylaxis for those women who test positive for GBS [2]. While this approach has significantly decreased the occurrence of neonatal early-onset GBS disease, it has not entirely eradicated GBS-related perinatal complications [7]. Moreover, the prevalence of GBS colonization varies considerably across countries and regions [8]. Previous studies have suggested that maternal age, obesity, abnormal glucose metabolism, vaginal microbiota imbalance, and previous obstetric history may be associated with GBS colonization or positive GBS screening [9, 10]. However, the findings remain inconsistent, and their generalizability across different regions is limited.
In recent years, perinatal medicine has increasingly moved beyond screening alone toward risk stratification and individualized management. In this context, identifying women with a higher probability of positive GBS screening, while maintaining standardized microbiological screening, has become a research topic of growing interest. Numerous research efforts have sought to create risk assessment models for GBS colonization or positive GBS screening by utilizing inflammatory markers or clinical traits [11, 12]. However, these investigations have often been constrained by limited sample sizes, a relatively limited range of predictors, and inadequate validation regarding the stability of the models and their practical use in clinical settings. Therefore, a prediction model for GBS screening positivity should not be positioned as a substitute for standard culture- or NAAT-based microbiological testing. Rather, such a model may have potential value as an adjunctive risk-stratification and decision-support tool within the existing universal screening framework. By using routinely collected clinical and laboratory information, model-based risk estimates may help support risk communication, screening adherence management, and the identification of women who may require closer follow-up. In this context, the present study aimed to develop and internally validate a machine learning-based prediction model for positive reproductive tract GBS screening in late-pregnancy women and to explore the interpretability of the final model using SHapley Additive exPlanations (SHAP) analysis.
Methods
Study design and participants
This was a single-center retrospective study for prediction model development and internal validation. Late-pregnancy women who received antenatal care and underwent reproductive tract GBS screening at The Fourth Hospital of Shijiazhuang Hospital between January 3, 2023, and May 14, 2024, were included. Clinical data were collected from the hospital electronic medical record system, antenatal care records, and laboratory testing database. Late pregnancy is generally defined as a gestational age of ≥ 28 weeks. In the original dataset, the gestational age at GBS screening ranged from 37 to 41 weeks. Therefore, the findings of this study are mainly applicable to clinical scenarios involving GBS screening close to delivery.
The inclusion criteria were as follows: late pregnancy, complete clinical data, singleton pregnancy, spontaneous conception, completion of GBS screening, and a definite screening result. The exclusion criteria were age < 20 years; use of systemic antibiotics or vaginal medication within 2 weeks before screening; severe urinary system diseases such as chronic nephritis; hematological diseases, immune system diseases, or malignant tumors; obvious cardiac, pulmonary, hepatic, or renal dysfunction; other acute infectious diseases; and previous or current psychiatric disorders or inability to cooperate with relevant examinations or data collection.
The study outcome was positive reproductive tract GBS screening. GBS positivity was determined according to the relevant criteria in the Chinese Expert Consensus on the Prevention of Perinatal Group B Streptococcal Disease and laboratory test results [13]. A total of 363 late-pregnancy women were ultimately included, including 91 with positive GBS screening results and 272 with negative results. According to GBS screening status, participants were categorized into the GBS-positive and GBS-negative groups for subsequent description of associated factors and development of the risk prediction model.
This study was conducted in accordance with the principles of the Declaration of Helsinki and was reviewed and approved by the Ethics Committee of The Fourth Hospital of Shijiazhuang Hospital (approval number: 20260018). Due to the nature of this research being a retrospective observational study conducted at a single center, information was gathered from pre-existing electronic medical records, records of antenatal care, and laboratory testing documentation. Prior to analysis, all data were anonymized, and no further clinical interventions took place. Throughout the study, the privacy of participants and the security of data were rigorously maintained. The general framework of the study is illustrated in Fig. 1.
Fig. 1.

Workflow of the study. Abbreviations: GBS, group B Streptococcus; LASSO, least absolute shrinkage and selection operator; SMOTE, synthetic minority oversampling technique; XGBoost, extreme gradient boosting; LightGBM, light gradient boosting machine; SVM, support vector machine; ANN, artificial neural network; SHAP, Shapley additive explanations
Data collection and variable definitions
Clinical data were collected from the hospital electronic medical record system, obstetric outpatient records, and laboratory information system. All data were extracted, entered, and verified by uniformly trained researchers to ensure accuracy and completeness. The collected information included general characteristics, demographic characteristics, obstetric history, pregnancy complications, infection-related indicators, laboratory test results, and GBS testing information.
General and demographic characteristics included study identification number, enrollment date, gestational age, maternal age, prepregnancy body mass index (BMI), gestational weight gain (GWG), education level, occupation, type of medical insurance, place of residence, history of smoking, smoking during pregnancy, history of alcohol consumption, and alcohol consumption during pregnancy. Obstetric history included gravidity, parity, primiparity, history of preterm birth, history of premature rupture of membranes/preterm premature rupture of membranes (PROM/PPROM), history of miscarriage or induced abortion, history of intrauterine infection or chorioamnionitis, history of neonatal early-onset infection or sepsis, and history of positive GBS screening. Variables related to pregnancy complications included prepregnancy gynecological examination, gestational diabetes mellitus (GDM), hypertensive disorders of pregnancy (HDP), gestational thyroid abnormalities, anemia, and intrahepatic cholestasis of pregnancy (ICP). Infection-related variables included abnormal vaginal discharge, vulvar symptoms such as itching, irritation, or odor, type of vaginitis, urinary tract infection (UTI), asymptomatic bacteriuria, vaginal pH, vaginal cleanliness grade, and Nugent score. Laboratory indicators included white blood cell count (WBC), neutrophil count, lymphocyte count, monocyte count, C-reactive protein (CRP), interleukin-6 (IL-6), and platelet count (PLT).
The outcome variable was the reproductive tract GBS test result. GBS positivity was defined as a positive result from combined vaginal–rectal specimens, whereas GBS negativity was defined as a negative result. Regarding variable types, maternal age, gestational age, prepregnancy BMI, GWG, vaginal pH, Nugent score, and laboratory indicators were treated as continuous variables. Education level, occupation, type of medical insurance, place of residence, obstetric history, pregnancy complications, infection-related clinical characteristics, and categorical information related to GBS testing were treated as categorical variables. Categorical variables were coded according to medical records and clinical diagnoses, whereas continuous variables were included in the analysis using their original values. Detailed definitions, data sources, coding methods, and value ranges of all candidate predictors are provided as a variable dictionary in Supplementary Table S1. After checking data completeness, no missing values were identified in the outcome variable or candidate predictors in the final analytic dataset; therefore, no missing-value imputation was performed.
GBS testing methods and classification criteria
All participants underwent reproductive tract GBS screening in late pregnancy. Specimens were collected by uniformly trained healthcare professionals according to standardized procedures, and combined vaginal–rectal specimens were obtained from all participants. The GBS testing methods included culture and polymerase chain reaction/nucleic acid amplification testing (PCR/NAAT). Culture was used in 36 participants (9.9%), whereas PCR/NAAT was used in 327 participants (90.1%); no participant had an unspecified testing method. The study outcome was positive GBS screening. The GBS status was assessed based on the criteria outlined in the Chinese Expert Consensus on Perinatal Group B Streptococcal Disease Prevention, as well as laboratory test outcomes [13]. A result indicating GBS positivity was classified as positive, while a result indicating GBS negativity was termed negative. Participants were divided into two groups—those who tested positive for GBS and those who tested negative—following their laboratory results to facilitate the analysis of related factors and the creation of the risk prediction model.
Statistical analysis
Data splitting and descriptive analysis
Statistical analyses and model development were conducted utilizing Python version 3.10.6, primarily leveraging the pandas, NumPy, scikit-learn, XGBoost, LightGBM, SHAP, matplotlib, and seaborn libraries. Initially, all participants were randomly assigned to a training set and a validation set in a 7:3 ratio. To achieve relatively balanced distributions of GBS-positive and GBS-negative participants across the two datasets, stratified sampling was executed, using GBS screening status as the stratification variable. Following a comprehensive review of data completeness, no missing values were found in either the outcome variable or the candidate predictors in the final analytic dataset; hence, missing-value imputation was unnecessary.
Continuous variables were summarized based on their distributions. Variables that followed a normal distribution were reported as mean ± standard deviation (x̄ ± s), with between-group comparisons conducted via the independent-samples t-test. For non-normally distributed variables, results were presented as median and interquartile range [M (P25, P75)], with the Mann–Whitney U test applied for comparisons between groups. Categorical variables were displayed as counts and percentages [n (%)], with the χ² test or Fisher’s exact test utilized for between-group comparisons as appropriate. A two-sided P value of less than 0.05 was deemed statistically significant.
Predictor selection and class imbalance handling
In the training set, least absolute shrinkage and selection operator (LASSO) logistic regression was first applied for preliminary variable selection, and the penalty parameter λ was determined by cross-validation. LASSO was used to reduce variable redundancy by shrinking less informative regression coefficients toward zero [14]. Because the model selected using the 1-SE criterion was overly sparse and did not retain sufficient candidate variables for subsequent multi-model comparison and exploration of potential nonlinear predictive information, the λ value corresponding to the minimum cross-validation error (λmin) was used as the preliminary LASSO selection criterion. The Boruta algorithm was then applied to the LASSO-selected variables for secondary feature selection to improve the robustness of predictor selection. The reduction from the LASSO-selected candidate variables to the final predictors was determined entirely by the Boruta secondary feature selection procedure. Variables retained by LASSO but not confirmed by Boruta were excluded from the final model because their importance values did not consistently exceed those of the shadow variables after multiple-testing correction. No predictors were excluded based on post-hoc subjective judgment, clinical inconvenience, or manual removal after model inspection. Boruta is a random forest–based wrapper method that identifies relevant variables by comparing their importance with that of shadow variables, thereby helping to capture nonlinear predictive information [15]. Specifically, the variables retained by LASSO were used as the input for Boruta, with the maximum number of iterations set to 100 and the significance level set to 0.01; Bonferroni correction was applied for multiple testing. This two-step strategy was adopted to combine the variable-reducing property of LASSO with the nonlinear feature selection ability of Boruta. Given the limited sample size and the relatively small number of GBS-positive events, this strategy was also intended to reduce model complexity, minimize the risk of overfitting, and obtain a relatively parsimonious set of predictors for subsequent model development [16].
Considering that the proportion of GBS-positive participants in the training set was lower than that of GBS-negative participants, indicating class imbalance, the synthetic minority oversampling technique (SMOTE) was applied only to the training data for class balancing [17]. SMOTE was implemented using the imbalanced-learn package in Python. The default SMOTE setting was used, with k_neighbors = 5, and a fixed random seed was applied to ensure reproducibility. In the original training set, 64 of 254 participants were GBS-positive and 190 were GBS-negative, corresponding to a GBS-positive proportion of 25.2%. After SMOTE, the number of GBS-positive samples was increased to match the number of GBS-negative samples, resulting in 190 GBS-positive and 190 GBS-negative samples, with a balanced class distribution of 50.0% for each class. To avoid data leakage, SMOTE was applied only after data splitting and was not applied to the validation set. The validation set retained its original outcome distribution, including 27 GBS-positive and 82 GBS-negative participants, corresponding to a GBS-positive proportion of 24.8%. During five-fold cross-validation and hyperparameter tuning within the training set, SMOTE was embedded within the modeling pipeline and applied only to the training portion of each fold; the held-out fold was kept unchanged. After hyperparameter tuning, the final models were refitted using the full SMOTE-balanced training set and were then evaluated in the original validation set. SMOTE was selected because the number of GBS-positive events was relatively smaller than that of GBS-negative cases, and the aim was to improve minority-class learning during model training. Importantly, SMOTE was used only as a training-stage imbalance-handling technique. It was not applied to the validation set, and during cross-validation it was embedded within the modeling pipeline and applied only to the training portion of each fold. Therefore, the held-out fold and the final validation set retained their original outcome distributions. This procedure was intended to reduce the risk of information leakage and to ensure that model performance, calibration, and decision-curve analysis were evaluated on data reflecting the original clinical class distribution.
Model development and hyperparameter tuning
Using the seven final predictors selected by LASSO regression and Boruta, seven binary classification models were developed: logistic regression, decision tree, random forest, extreme gradient boosting (XGBoost), light gradient boosting machine (LightGBM), support vector machine (SVM), and artificial neural network (ANN). The selected models covered several commonly used modeling strategies, including a traditional linear model, a single-tree model, ensemble tree-based models, a kernel-based classifier, and a neural network model. This diversity allowed comparison between interpretable traditional methods and more flexible nonlinear machine learning approaches [18, 19]. To avoid information leakage, preprocessing, SMOTE, and model fitting were incorporated into a unified modeling pipeline during five-fold cross-validation. Specifically, all preprocessing procedures were fitted only within the training portion of each cross-validation fold, and SMOTE was also applied only to the training portion of each fold. The corresponding held-out fold was not oversampled. In the cases of the logistic regression, SVM, and ANN models, continuous variables were standardized, and categorical variables were transformed into dummy variables. For the tree-based and gradient boosting models, categorical variables were also dummy coded, while continuous variables were maintained on their initial scale. With the exception of logistic regression, all machine learning models underwent hyperparameter optimization via grid search integrated with five-fold cross-validation, utilizing the area under the receiver operating characteristic curve (AUC) as the primary criterion for optimization. Following the identification of the optimal hyperparameter configuration, each finalized model was refitted using the full training set with SMOTE applied only to the training data and then assessed in the original validation dataset, which was not oversampled. To obtain a more reliable estimate of internal model performance within the training set, out-of-fold predicted probabilities were generated through five-fold cross-validation. These probabilities were utilized for calculating cross-validated AUC values and producing receiver operating characteristic (ROC) curves, calibration curves, and decision curves.
Model performance evaluation and model comparison
Model discrimination was evaluated through the AUC and its 95% confidence interval (CI). The estimation of the 95% CI for the AUC utilized bootstrap resampling methods. Differences in AUC among various models were examined using the DeLong test. The classification performance was analyzed at the standard probability threshold of 0.5, which included measures such as accuracy, sensitivity, specificity, positive predictive value, negative predictive value, F1 score, Kappa statistic, and Youden index. The McNemar test was employed to assess differences in classification consistency between models at this standard threshold. Calibration of the model was primarily assessed through calibration curves and the Brier score, where a lower Brier score denotes improved agreement between predicted probabilities and actual outcomes. Additionally, the Hosmer–Lemeshow goodness-of-fit test was applied as a supplementary evaluation for calibration. The clinical utility was analyzed with the help of decision curve analysis (DCA), which assessed the net benefit of predictions derived from the model compared to intervention-for-all and intervention-for-none approaches across varied threshold probabilities.
Model interpretation using SHAP
The ultimate model was primarily chosen based on the performance metrics obtained from the validation set, which included the AUC, Brier score, calibration curve, and DCA outcomes. The SHAP approach was employed to analyze the final selected model. This method, rooted in game theory, assesses the role of each predictor in influencing individual predictions and offers both comprehensive and specific explanations for intricate machine learning models [20]. Global feature importance plots, beeswarm plots, and dependence plots were created to illustrate the strength and direction of each predictor’s impact on the model’s predicted probability of screening positive for GBS. For individual prediction insights, waterfall and force plots were utilized. It is crucial to note that while SHAP values indicate the contributions made by predictors within the model, they should not be seen as indicative of causal relationships in actual clinical scenarios. SHAP values were interpreted only as measures of feature contribution to model predictions and were not used to infer causal effects or biological mechanisms.
Web-based risk calculator development
After the final prediction model was determined, an online web-based risk calculator was developed based on the final random forest model to display individualized predicted probabilities of GBS screening positivity and corresponding model interpretation results. The calculator was built using the Streamlit framework and deployed on Streamlit Community Cloud. The input variables were consistent with those in the final model, including education level, platelet count, lymphocyte count, type of vaginitis, abnormal vaginal discharge, gestational thyroid disease, and gestational weight gain. The access procedure is as follows: users open the URL in a web browser, enter the seven required predictors, and click the prediction button. The system then automatically calls the saved random forest model and generates the individualized predicted probability of GBS screening positivity. For visualization, the calculator also provides an exploratory model-based probability group and an individual-level SHAP waterfall plot to illustrate the contribution of each predictor to the individual prediction. Importantly, this calculator was developed only as a proof-of-concept/internal demonstration tool for model visualization, individualized prediction display, and preparation for future external validation. Because the underlying model was developed from a relatively small single-center retrospective dataset and has not yet undergone multicenter external validation, prospective evaluation, recalibration in independent populations, or clinical impact assessment, the calculator should not be used for independent clinical decision-making. It cannot replace standard microbiological GBS testing, clinician judgment, clinical diagnosis, screening decisions, or decisions regarding intrapartum antibiotic prophylaxis.
Sensitivity analyses
Two sensitivity analyses were performed to assess the robustness of the final random forest model. First, because the proportion of primiparous women differed between the training and validation cohorts, a propensity score weighting sensitivity analysis was conducted to evaluate the potential influence of this imbalance on validation performance. The final random forest model was not refitted, and primiparity was not added as a predictor to the model. Instead, primiparity was used only as an adjustment variable. A logistic regression model was fitted in the combined training and validation data to estimate the propensity of being assigned to the validation cohort using primiparity as the covariate. For participants in the validation cohort, weights were calculated as (1 − propensity score) / propensity score and normalized to have a mean of 1. The original validation-set predicted probabilities were then re-evaluated using these weights. Weighted AUC, F1 score, and Brier score were calculated and compared with the corresponding unweighted validation metrics.
Second, to evaluate the adequacy of outcome events relative to model complexity, the events per variable (EPV) was calculated as the number of GBS-positive events divided by the seven predictors included in the final model. In addition, to assess potential optimism due to the limited sample size, a bootstrap optimism correction analysis was performed using the full analytic dataset. The final random forest model was refitted using the same seven predictors and the same prespecified hyperparameters as in the primary analysis, without additional hyperparameter tuning. Bootstrap resampling was repeated 1,000 times. In each iteration, the model was fitted in the bootstrap sample and evaluated both in the bootstrap sample and in the original full dataset. Optimism was estimated as the average difference in model performance between the bootstrap sample and the original dataset. Optimism-corrected AUC and Brier score were then calculated by adjusting the apparent performance for the estimated optimism.
Results
Baseline characteristics of participants
A total of 363 late-pregnancy women were ultimately included in this study, including 272 GBS-negative and 91 GBS-positive participants, corresponding to a positive GBS screening rate of 25.1%. Analysis based on GBS screening status indicated that the demographic characteristics, obstetric history, complications during pregnancy, infection-related clinical traits, and laboratory metrics were largely similar in both GBS-positive and GBS-negative groups (see Supplementary Table S2). Notably, with the exception of gestational weight gain, asymptomatic bacteriuria, and the composite urinary tract infection (UTI) variable, most factors did not exhibit significant differences between the two groups. Specifically, significant differences were observed in gestational weight gain between the GBS-positive and GBS-negative groups (P = 0.041), while the distributions of asymptomatic bacteriuria and the composite UTI variable also presented statistically significant differences (P = 0.005 and P = 0.003, respectively). Following a stratified random sampling approach based on GBS screening status, the participants were allocated into a training cohort and a validation cohort at a 7:3 ratio, comprising 254 participants in the training cohort and 109 in the validation cohort. The training and validation cohorts included 64 (25.2%) and 27 (24.8%) GBS-positive participants, respectively, revealing no statistically significant difference between these cohorts (P = 1.000; standardized mean difference [SMD] = 0.010). Overall, the training and validation cohorts were comparably balanced regarding demographic characteristics, obstetric history, pregnancy complications, infection-related traits, and laboratory metrics, as detailed in Table 1. Aside from a greater percentage of primiparous women in the validation cohort compared to the training cohort (78.0% vs. 62.6%; P = 0.006; SMD = 0.337), most variables showed no significant differences between the two cohorts, indicating acceptable comparability following data division. Several candidate variables showed no positive values in this study sample, including history of preterm birth, history of PROM/PPROM, history of intrauterine infection or chorioamnionitis, history of neonatal early-onset infection or sepsis, history of positive GBS screening, ICP, history of smoking, smoking during pregnancy, history of alcohol consumption, and alcohol consumption during pregnancy. Therefore, these zero-variance variables were not presented in the baseline table and were not included in subsequent model construction.
Table 1.
Comparison of baseline characteristics between the training and validation sets
| Characteristics | Training set (n = 254) |
Validation set (n = 109) | P value | SMD |
|---|---|---|---|---|
| Demographic characteristics | ||||
| Maternal age | 29.00 (27.00, 31.00) | 29.00 (27.00, 31.00) | 0.388 | 0.127 |
| Prepregnancy BMI | 22.18 (20.25, 24.05) | 21.71 (19.74, 24.04) | 0.376 | 0.082 |
| Gestational weight gain | 14.05 (10.10, 17.60) | 14.10 (11.30, 17.70) | 0.433 | 0.093 |
| Education level | 0.068 | |||
| Junior high school or below | 14 (5.5) | 8 (7.3) | 0.075 | |
| High school/technical secondary school/junior college | 45 (17.7) | 30 (27.5) | 0.234 | |
| Bachelor’s degree or above | 195 (76.8) | 71 (65.1) | 0.256 | |
| Occupation | 0.567 | |||
| Medical staff | 16 (6.3) | 9 (8.3) | 0.075 | |
| Teacher/civil servant | 48 (18.9) | 16 (14.7) | 0.113 | |
| Enterprise employee | 72 (28.3) | 30 (27.5) | 0.018 | |
| Unemployed | 96 (37.8) | 48 (44.0) | 0.127 | |
| Other | 22 (8.7) | 6 (5.5) | 0.123 | |
| Medical insurance type | 0.916 | |||
| Employee medical insurance | 90 (35.4) | 41 (37.6) | 0.045 | |
| Resident medical insurance | 110 (43.3) | 45 (41.3) | 0.041 | |
| New rural cooperative medical scheme | 54 (21.3) | 23 (21.1) | 0.004 | |
| Residence | 0.192 | |||
| Urban | 138 (54.3) | 68 (62.4) | 0.163 | |
| Rural | 116 (45.7) | 41 (37.6) | 0.163 | |
| Obstetric history | ||||
| Gravidity | 2.00 (1.00, 3.00) | 2.00 (1.00, 2.00) | 0.141 | 0.228 |
| Primipara | 0.006 | |||
| No | 95 (37.4) | 24 (22.0) | 0.337 | |
| Yes | 159 (62.6) | 85 (78.0) | 0.337 | |
| History of abortion or induced labor | 0.220 | |||
| No | 136 (53.5) | 50 (45.9) | 0.153 | |
| Yes | 118 (46.5) | 59 (54.1) | 0.153 | |
| Preconception gynecologic examination | 0.052 | |||
| No | 224 (88.2) | 104 (95.4) | 0.263 | |
| Yes | 30 (11.8) | 5 (4.6) | 0.263 | |
| Pregnancy complications | ||||
| Gestational diabetes mellitus | 0.195 | |||
| No | 193 (76.0) | 75 (68.8) | 0.161 | |
| Yes | 61 (24.0) | 34 (31.2) | 0.161 | |
| Hypertensive disorders of pregnancy | 0.653 | |||
| No | 238 (93.7) | 100 (91.7) | 0.075 | |
| Yes | 16 (6.3) | 9 (8.3) | 0.075 | |
| Gestational thyroid disorder | 0.512 | |||
| No | 223 (87.8) | 99 (90.8) | 0.098 | |
| Yes | 31 (12.2) | 10 (9.2) | 0.098 | |
| Anemia | 0.927 | |||
| No | 217 (85.4) | 92 (84.4) | 0.029 | |
| Yes | 37 (14.6) | 17 (15.6) | 0.029 | |
| Infection-related characteristics | ||||
| Abnormal vaginal discharge | 0.154 | |||
| No | 141 (55.5) | 70 (64.2) | 0.178 | |
| Yes | 113 (44.5) | 39 (35.8) | 0.178 | |
| Vulvar symptoms | 0.330 | |||
| No | 184 (72.4) | 85 (78.0) | 0.128 | |
| Yes | 70 (27.6) | 24 (22.0) | 0.128 | |
| Vaginitis type | 0.529 | |||
| None | 153 (60.2) | 72 (66.1) | 0.121 | |
| Candidiasis | 67 (26.4) | 26 (23.9) | 0.058 | |
| Mixed vaginitis | 34 (13.4) | 11 (10.1) | 0.102 | |
| Urinary tract infection | 0.785 | |||
| No | 242 (95.3) | 105 (96.3) | 0.053 | |
| Yes | 12 (4.7) | 4 (3.7) | 0.053 | |
| Asymptomatic bacteriuria | 0.359 | |||
| No | 243 (95.7) | 107 (98.2) | 0.144 | |
| Yes | 11 (4.3) | 2 (1.8) | 0.144 | |
| Urinary infection | 0.351 | |||
| No | 231 (90.9) | 103 (94.5) | 0.137 | |
| Yes | 23 (9.1) | 6 (5.5) | 0.137 | |
| Vaginal pH | 4.50 (4.40, 4.70) | 4.50 (4.40, 4.70) | 0.927 | 0.035 |
| Vaginal cleanliness | 0.560 | |||
| Grade II | 116 (45.7) | 52 (47.7) | 0.041 | |
| Grade III | 110 (43.3) | 49 (45.0) | 0.033 | |
| Grade IV | 28 (11.0) | 8 (7.3) | 0.128 | |
| Nugent score | 1.00 (1.00, 2.00) | 1.00 (1.00, 2.00) | 0.918 | 0.018 |
| GBS result | 1.000 | |||
| Negative | 190 (74.8) | 82 (75.2) | 0.010 | |
| Positive | 64 (25.2) | 27 (24.8) | 0.010 | |
| Laboratory indicators | ||||
| White blood cell count | 10.52 ± 2.18 | 10.24 ± 2.24 | 0.281 | 0.124 |
| Neutrophil count | 7.50 ± 1.64 | 7.33 ± 1.75 | 0.400 | 0.098 |
| Lymphocyte count | 1.69 (1.40, 2.10) | 1.68 (1.36, 2.04) | 0.524 | 0.094 |
| Monocyte count | 0.45 (0.36, 0.54) | 0.44 (0.36, 0.54) | 0.948 | 0.000 |
| C-reactive protein | 7.49 (3.44, 18.74) | 6.72 (3.67, 17.13) | 0.671 | 0.059 |
| Interleukin-6 | 6.63 (4.39, 17.22) | 6.46 (4.07, 18.21) | 0.971 | 0.032 |
| Platelet count | 217.29 ± 45.09 | 222.08 ± 49.32 | 0.385 | 0.101 |
Continuous variables are presented as mean ± standard deviation or median (interquartile range), according to their distribution. Categorical variables are presented as n (%). P values were calculated using the t test or Mann–Whitney U test for continuous variables and the chi-square or Fisher’s exact test for categorical variables
SMD Standardized mean difference, BMI Body mass index, GBS group B Streptococcus
Predictor selection
Using the training set only, LASSO regression was first applied for preliminary screening of candidate predictors. Cross-validation showed that 10 candidate variables were retained when the λ value corresponding to the minimum cross-validation error (λmin) was used. Because the model selected under the 1-SE criterion was overly sparse and did not retain sufficient candidate variables for subsequent machine learning model development and exploration of potential nonlinear predictive information, λmin was used as the preliminary LASSO selection criterion. The 10 candidate variables retained by LASSO were gestational weight gain, history of miscarriage or induced abortion, GDM, gestational thyroid disease, abnormal vaginal discharge, type of vaginitis, lymphocyte count, platelet count, education level, and the composite urinary tract infection (UTI) variable. The LASSO cross-validation curve and coefficient path plot showed the changes in model error and the shrinkage process of regression coefficients across different λ values, respectively (Fig. 2A and B). The Boruta algorithm was subsequently used to evaluate the importance of these candidate variables. The maximum number of iterations was set to 100, the significance level was set to 0.01, and Bonferroni correction was applied for multiple testing. Boruta confirmed seven variables as final predictive features with relatively stable predictive importance: education level, platelet count, lymphocyte count, type of vaginitis, abnormal vaginal discharge, gestational thyroid disease, and gestational weight gain. In contrast, history of miscarriage or induced abortion, GDM, and the composite UTI variable were retained by LASSO at λmin but were not confirmed as final predictive features by Boruta. Their importance values did not consistently exceed those of the shadow variables after Bonferroni correction; therefore, these three variables were excluded from the final model. The Boruta importance trajectory plot and boxplot showed that the importance values of the confirmed variables were generally higher than those of the shadow variables, suggesting relatively stable contributions to model prediction (Fig. 2C and D). Therefore, seven predictive features were ultimately included in subsequent machine learning model development: education level, platelet count, lymphocyte count, type of vaginitis, abnormal vaginal discharge, gestational thyroid disease, and gestational weight gain.
Fig. 2.

Predictor selection using LASSO regression and the Boruta algorithm. A Cross-validation curve of the LASSO logistic regression model. The red dotted vertical line indicates the value of λ corresponding to the minimum cross-validation error (λmin), whereas the blue dotted vertical line indicates the λ value selected by the 1-SE criterion. B LASSO coefficient profile plot showing the shrinkage trajectories of candidate predictor coefficients across different log(λ) values. C Boruta variable importance trajectory plot across 100 classifier runs. Confirmed, tentative, rejected, and shadow features are shown in different colors. D Boruta importance boxplot comparing the importance distributions of candidate variables and shadow features. Variables with importance consistently higher than the shadow features were confirmed as final predictive features. Based on the two-step selection procedure, seven variables were retained for model development: education level, platelet count, lymphocyte count, type of vaginitis, abnormal vaginal discharge, gestational thyroid disease, and gestational weight gain
Model development and internal cross-validation performance in the training set
Utilizing the seven predictors identified through LASSO regression and the Boruta approach, a total of seven binary classification models were constructed using the training dataset. These models included logistic regression, decision tree, random forest, XGBoost, LightGBM, support vector machine, and artificial neural network. A consistent modeling pipeline was applied across all models to ensure standardized preprocessing, SMOTE application, and model fitting. For the machine learning models other than logistic regression, hyperparameter optimization was conducted using grid search combined with five-fold cross-validation, with AUC as the primary optimization metric. Supplementary Table S3 outlines the prospective parameter ranges and their optimal combinations. To mitigate the risk of overestimating model efficacy linked to resubstitution evaluation within the training dataset, out-of-fold (OOF) predicted probabilities were generated through the same five-fold cross-validation method. These OOF probabilities were instrumental in evaluating the internal cross-validation performance for each model within the training dataset. In the OOF evaluation, the random forest model exhibited the best discrimination performance, achieving an AUC of 0.795 (95% CI: 0.744–0.839), followed closely by XGBoost (AUC = 0.785, 95% CI: 0.734–0.830) and the artificial neural network (AUC = 0.784, 95% CI: 0.737–0.829). The AUC figures for LightGBM, support vector machine, decision tree, and logistic regression were noted as 0.756, 0.743, 0.733, and 0.680, respectively, as indicated in Table 2; Fig. 3A. At a default probability threshold set at 0.5, the random forest model reached an accuracy of 0.711, demonstrating a sensitivity of 0.732 and a specificity of 0.689. Its positive predictive value was 0.702, and the negative predictive value stood at 0.720, with an F1 score recorded at 0.716. In contrast, the XGBoost model achieved the highest accuracy at 0.716, while the LightGBM model exhibited the best sensitivity at 0.758, although it had a comparatively lower specificity of 0.632. Conversely, the logistic regression method displayed poorer overall classification effectiveness, with an accuracy of 0.634, an F1 score of 0.613, and a Youden index of 0.268 (refer to Table 2). Evaluation of calibration metrics revealed that the random forest model produced the lowest Brier score of 0.186, indicating a good alignment between the predicted probabilities and the observed outcomes during the internal cross-validation of the training set. The Brier scores for both XGBoost and the artificial neural network model were 0.191 and 0.197, respectively, suggesting reasonably good performance in probability prediction as well. The decision tree model recorded the highest Brier score at 0.248 (see Fig. 3B). Decision curve analysis using out-of-fold predicted probabilities indicated that, within a specific range of threshold probabilities, the random forest, XGBoost, LightGBM, and artificial neural network models provided a greater net benefit compared to both the intervention-for-all and intervention-for-none strategies (illustrated in Fig. 3C). Ultimately, during the five-fold out-of-fold cross-validation of the training set, the random forest model achieved the highest AUC and the lowest Brier score, highlighting its favorable discrimination and calibration performance. The discrimination capabilities of the XGBoost and artificial neural network models were nearly comparable to those of the random forest model.
Table 2.
Performance of candidate models based on 5-fold cross-validated OOF predictions in the training set
| Model | AUC (95% CI) | Accuracy | Sensitivity | Specificity | PPV | NPV | F1 score | Kappa | Youden index | Brier score |
|---|---|---|---|---|---|---|---|---|---|---|
| Random forest | 0.795 (0.744–0.839) | 0.711 | 0.732 | 0.689 | 0.702 | 0.720 | 0.716 | 0.421 | 0.421 | 0.186 |
| XGBoost | 0.785 (0.734–0.830) | 0.716 | 0.732 | 0.700 | 0.709 | 0.723 | 0.720 | 0.432 | 0.432 | 0.191 |
| ANN | 0.784 (0.737–0.829) | 0.705 | 0.711 | 0.700 | 0.703 | 0.707 | 0.707 | 0.411 | 0.411 | 0.197 |
| LightGBM | 0.756 (0.703–0.803) | 0.695 | 0.758 | 0.632 | 0.673 | 0.723 | 0.713 | 0.389 | 0.389 | 0.207 |
| SVM | 0.743 (0.695–0.791) | 0.658 | 0.700 | 0.616 | 0.646 | 0.672 | 0.672 | 0.316 | 0.316 | 0.208 |
| Decision tree | 0.733 (0.681–0.782) | 0.692 | 0.726 | 0.658 | 0.680 | 0.706 | 0.702 | 0.384 | 0.384 | 0.248 |
| Logistic regression | 0.680 (0.626–0.732) | 0.634 | 0.579 | 0.689 | 0.651 | 0.621 | 0.613 | 0.268 | 0.268 | 0.221 |
Performance metrics were calculated using 5-fold cross-validated OOF predictions in the training set. Classification metrics were calculated at the default threshold of 0.5. A lower Brier score indicates better calibration
OOF Out-of-fold, AUC Area under the receiver operating characteristic curve, CI Confidence interval, PPV Positive predictive value, NPV Negative predictive value, ANN Artificial neural network, SVM Support vector machine
Fig. 3.

Internal cross-validation performance of the seven prediction models in the training set. A Receiver operating characteristic curves based on five-fold cross-validated out-of-fold predicted probabilities. The random forest model achieved the highest AUC among the seven models, followed by XGBoost and the artificial neural network model. B Calibration curves based on five-fold cross-validated out-of-fold predicted probabilities. The dashed diagonal line represents perfect calibration, and the Brier score for each model is shown in the legend. C Decision curve analysis based on five-fold cross-validated out-of-fold predicted probabilities. The net benefit of each model was compared across a range of threshold probabilities, with the intervention-for-all and intervention-for-none strategies used as reference strategies
Comparison of the seven models in the validation set and final model selection
Table 3 presents a summary of the performance metrics for the seven candidate models in the internal validation set. The random forest model recorded the highest AUC of 0.868 (95% CI: 0.811–0.922), followed closely by XGBoost with an AUC of 0.851 (95% CI: 0.792–0.902) and LightGBM with 0.841 (95% CI: 0.781–0.894). In contrast, the AUCs for the SVM and ANN models were 0.802 and 0.801, respectively, while the decision tree and logistic regression models displayed comparatively lower AUCs of 0.723 and 0.648, correspondingly. The ROC curves derived from the validation set revealed that the random forest, XGBoost, and LightGBM models demonstrated superior discrimination when compared to the other models (Fig. 4A). With a default probability threshold set at 0.5, the random forest model achieved an accuracy of 0.787, a sensitivity of 0.841, and specificity of 0.732, alongside a positive predictive value of 0.758, a negative predictive value of 0.822, and an F1 score of 0.798. Regarding calibration, this model recorded the lowest Brier score of 0.153, signifying a commendable alignment between predicted probabilities and actual outcomes. The calibration curve for the validation set also indicated strong calibration performance for the random forest model. Decision curve analysis revealed that within a particular range of threshold probabilities, the random forest model yielded a higher net benefit compared to the intervention-for-all and intervention-for-none strategies, indicating its possible clinical relevance (Fig. 4B and C). Additionally, the DeLong test was applied to assess the differences in AUC among the candidate models, revealing that the random forest model’s AUC surpassed those of the logistic regression, decision tree, SVM, and ANN models, while the discrepancies when compared to XGBoost and LightGBM were not statistically significant (Fig. 4D). The McNemar test, utilizing a standard threshold of 0.5, indicated that the classification outcomes from the random forest model were distinct from those produced by logistic regression and decision tree methods. In contrast, no significant differences were detected when comparing it to XGBoost, LightGBM, and SVM (refer to Fig. 4E). Additionally, as part of a supplementary calibration evaluation, the Hosmer–Lemeshow test did not reveal significant miscalibration within the random forest model (see Fig. 4F). It is important to highlight that the pairwise comparisons among the models involved multiple testing, hence the resulting P values should be regarded with caution as they are exploratory in nature. Overall, considering the validation set’s discrimination, classification performance, calibration performance, decision curve analysis, and inter-model comparisons, the random forest model was ultimately chosen as the final prediction model and was later employed for interpretability analysis based on SHAP.
Table 3.
Performance of candidate models in the internal validation set
| Model | AUC (95% CI) | Accuracy | Sensitivity | Specificity | PPV | NPV | F1 score | Kappa | Youden index | Brier score |
|---|---|---|---|---|---|---|---|---|---|---|
| Random forest | 0.868 (0.811–0.922) | 0.787 | 0.841 | 0.732 | 0.758 | 0.822 | 0.798 | 0.573 | 0.573 | 0.153 |
| XGBoost | 0.851 (0.792–0.902) | 0.738 | 0.805 | 0.671 | 0.710 | 0.775 | 0.754 | 0.476 | 0.476 | 0.162 |
| LightGBM | 0.841 (0.781–0.894) | 0.738 | 0.841 | 0.634 | 0.697 | 0.800 | 0.762 | 0.476 | 0.476 | 0.165 |
| SVM | 0.802 (0.727–0.869) | 0.738 | 0.805 | 0.671 | 0.710 | 0.775 | 0.754 | 0.476 | 0.476 | 0.188 |
| ANN | 0.801 (0.734–0.868) | 0.720 | 0.780 | 0.659 | 0.696 | 0.750 | 0.736 | 0.439 | 0.439 | 0.187 |
| Decision tree | 0.723 (0.645–0.800) | 0.659 | 0.707 | 0.610 | 0.644 | 0.676 | 0.674 | 0.317 | 0.317 | 0.256 |
| Logistic regression | 0.648 (0.566–0.735) | 0.610 | 0.622 | 0.598 | 0.607 | 0.613 | 0.614 | 0.220 | 0.220 | 0.228 |
Performance metrics were calculated using 5-fold cross-validated OOF predictions in the training set. Classification metrics were calculated at the default threshold of 0.5. A lower Brier score indicates better calibration
AUC Area under the receiver operating characteristic curve, CI Confidence interval, PPV Positive predictive value, NPV Negative predictive value, ANN Artificial neural network, SVM Support vector machine
Fig. 4.

Validation-set performance and model comparison of the seven candidate prediction models. A Receiver operating characteristic curves of the seven candidate models in the validation set. B Calibration curves of the seven models in the validation set; the dashed diagonal line represents perfect calibration, and Brier scores are shown in the legend. C Decision curve analysis comparing the net benefit of each model across different threshold probabilities in the validation set. The treat-all and treat-none strategies are shown as reference strategies. D Pairwise DeLong test for AUC comparisons among the seven models. E Pairwise McNemar test for classification comparisons at the default probability threshold of 0.5. F Hosmer–Lemeshow goodness-of-fit test for calibration assessment. P values < 0.05 are highlighted in red. AUC, area under the receiver operating characteristic curve
SHAP interpretability analysis of the final random forest model
To enhance the interpretability of the final random forest model, an analysis using SHAP was conducted to assess the influence of each predictor on the model’s output regarding the predicted probability of GBS screening positivity. The findings are illustrated in Fig. 5. The global SHAP feature importance analysis revealed that the platelet count had the most significant contribution to the output of the random forest model, followed by vaginitis type, gestational weight gain, gestational thyroid conditions, lymphocyte count, educational attainment, and the presence of abnormal vaginal discharge. These findings suggest that hematological indicators, factors related to the vaginal microenvironment, and pregnancy-related metabolic or endocrine factors provided predictive information for identifying positive GBS screening. The SHAP beeswarm plot further illustrated the direction and magnitude of the contributions of individual variable values to model output. Overall, platelet count and type of vaginitis showed relatively wide distributions of SHAP values, indicating substantial heterogeneity in their contributions to individual predictions. For some values or categories, type of vaginitis showed relatively high positive SHAP values, suggesting that this feature increased the probability of being predicted as GBS-positive by the model. However, this finding should not be interpreted as evidence that type of vaginitis causes GBS positivity. Continuous variables such as platelet count, gestational weight gain, and lymphocyte count showed nonlinear contributions to model output, indicating that their relationships with the predicted probability were not simply linear. For categorical variables, the SHAP value distributions differed across categories of type of vaginitis, gestational thyroid disease, and abnormal vaginal discharge, suggesting that these clinical features provided useful predictive information for model-based risk stratification. Individual-level SHAP interpretation further illustrated how the model generated prediction results for a single participant. SHAP dependence plots further illustrated the relationships between individual predictors and model output (Fig. 6A–G). Overall, these findings indicate that SHAP can decompose the prediction of the random forest model into individualized contributions of each predictor, thereby improving model interpretability. These variables contributed to the model output to varying degrees, but their importance values should be interpreted as model-based predictive contributions rather than causal effects.
Fig. 5.

SHAP interpretation of the final random forest model for predicting GBS screening positivity. A Global SHAP feature importance plot ranking predictors according to their mean absolute SHAP values. B SHAP beeswarm plot showing the distribution, direction, and magnitude of each predictor’s contribution to model output. Each point represents one participant, with color indicating the corresponding feature value. C SHAP waterfall plot showing how individual predictors contributed to the predicted probability for a representative participant. Red bars indicate positive contributions to the predicted probability, and blue bars indicate negative contributions. SHAP values represent predictive contributions within the model rather than causal effects. SHAP, Shapley additive explanations; GBS, group B Streptococcus
Fig. 6.

SHAP dependence plots for predictors included in the final random forest model. A Education level. B Type of vaginitis. C Abnormal vaginal discharge. D Gestational thyroid disease. E Platelet count. F Lymphocyte count. G Gestational weight gain. Each point represents one participant. The x-axis shows the observed value or coded category of each predictor, and the y-axis shows the corresponding SHAP value. Positive SHAP values increase the predicted probability of GBS screening positivity, whereas negative SHAP values decrease it. The red curve indicates the smoothed trend, and the horizontal dashed line indicates SHAP = 0. SHAP values represent model-based predictive contributions rather than causal effects. SHAP, Shapley additive explanations; GBS, group B Streptococcus
Development of the web-based risk calculator
Based on the final random forest model, an online web-based risk calculator was further developed to display the predicted probability of GBS screening positivity and individualized model interpretation results. The calculator is available at: https://gbs-risk-calculator-w76pi28kzzkvzfy2fkv6hy.streamlit.app/. After users enter the seven predictors incorporated into the final model, including education level, platelet count, lymphocyte count, type of vaginitis, abnormal vaginal discharge, gestational thyroid disease, and gestational weight gain, the web page automatically generates the model-predicted probability of GBS screening positivity. For visual display, the calculator also provides an exploratory model-based probability group and an individual-level SHAP waterfall plot. A screenshot of the web interface and an example of model inputs and outputs are shown in Fig. 7. In the example case, the user entered intermediate education level, mixed vaginitis, abnormal vaginal discharge, gestational thyroid disorder, platelet count of 200.0, lymphocyte count of 1.84, and gestational weight gain of 12.0. The calculator generated a predicted probability of GBS screening positivity of 69.7% and classified the case into the high predicted probability group according to the predefined exploratory probability cutoffs. The SHAP waterfall plot further illustrated the contribution of each predictor to the individual prediction. It should be emphasized that the probability grouping was provided only for visualization and research demonstration and should not be interpreted as an externally validated clinical decision threshold. The web-based calculator was developed primarily for research demonstration, visualization of model predictions, individualized model interpretation, and preparation for future external validation. Because the underlying model has not yet undergone multicenter external validation, prospective evaluation, recalibration in independent populations, or clinical impact assessment, the calculator is not ready for independent clinical use. It should not be used to determine whether microbiological GBS testing is needed, to guide intrapartum antibiotic prophylaxis, or to replace clinician judgment.
Fig. 7.

Web-based GBS positivity risk calculator and example output. A Screenshot of the input interface and prediction result of the web-based calculator. Users enter the seven predictors included in the final random forest model, including education level, platelet count, lymphocyte count, type of vaginitis, abnormal vaginal discharge, gestational thyroid disease, and gestational weight gain. The calculator then displays the model-predicted probability of GBS screening positivity and an exploratory model-based probability group. B Example of the individual-level SHAP explanation, including feature-specific SHAP contributions and a SHAP waterfall plot. The SHAP waterfall plot illustrates how each predictor contributes to the model-predicted probability for the example case
Sensitivity analyses
Because the proportion of primiparous women was higher in the validation cohort than in the training cohort, a propensity score weighting sensitivity analysis was performed to assess the potential influence of this imbalance on validation performance. After weighting, the weighted primipara proportion in the validation cohort decreased from 78.0% to 63.8%, which was close to that in the training cohort (62.6%). The SMD for primiparity decreased from 0.337 before weighting to 0.024 after weighting, indicating substantially improved balance. In the main validation analysis, the final random forest model achieved an unweighted validation AUC of 0.868 and a Brier score of 0.153. After propensity score weighting, the weighted validation AUC and Brier score were 0.909 and 0.157, respectively, and the weighted F1 score was 0.676. Overall, the discrimination performance did not decrease after weighting, and the Brier score changed only slightly. These findings suggested that the imbalance in primiparity did not materially weaken the validation performance of the final model.
The final random forest model included seven predictors and 91 GBS-positive events, corresponding to an EPV value of 13.0. To further assess potential overestimation of model performance due to the limited sample size, a 1,000-iteration bootstrap optimism correction analysis was performed using the full analytic dataset. The apparent AUC was 1.000, with an estimated optimism of 0.041, resulting in an optimism-corrected AUC of 0.959. The apparent Brier score was 0.025, and the optimism-corrected Brier score was 0.096. These findings suggested that the apparent model performance was optimistic, particularly for probability prediction, although the model retained relatively high discrimination after optimism correction.
Discussion
Main findings
GBS is an important opportunistic pathogen during the perinatal period. It can colonize the gastrointestinal and reproductive tracts of pregnant women and may be transmitted from mother to infant during delivery. Recent evidence from the Global Burden of Disease Study indicates that GBS-related diseases continue to contribute to invasive neonatal infections, deaths, neurodevelopmental impairment, maternal infections, and stillbirths [8]. Therefore, while standardized microbiological screening remains the foundation of GBS prevention, further exploration of risk stratification tools applicable to clinical settings has potential public health and perinatal relevance. In this single-center cohort of late-pregnancy women, we developed and interpreted prediction models for positive reproductive tract GBS screening. A total of 363 participants were included, including 91 with positive GBS screening results and 272 with negative results. After feature selection using LASSO regression and the Boruta algorithm, seven predictors were retained in the final model: education level, platelet count, lymphocyte count, type of vaginitis, abnormal vaginal discharge, gestational thyroid disease, and gestational weight gain. Among the seven candidate models, the random forest model showed relatively favorable performance in the validation set, with an AUC of 0.868 and a Brier score of 0.153. SHAP analysis suggested that platelet count, type of vaginitis, and gestational weight gain contributed relatively more predictive information to the model output for identifying positive GBS screening. These findings were derived from single-center retrospective data and mainly reflect statistical associations and model-based predictive contributions. They should not be interpreted as evidence of causal relationships between these variables and positive GBS screening. Importantly, the model was developed to complement, rather than replace, universal microbiological GBS screening. Its potential role is limited to auxiliary risk stratification, screening adherence management, and risk communication within the existing screening pathway.
Comparison with previous studies
Many nations currently maintain that screening for GBS during the later stages of pregnancy and administering antibiotic prophylaxis during labor are essential methods for preventing early-onset GBS disease in newborns. The American College of Obstetricians and Gynecologists (ACOG) advocates for routine GBS screening at 36 0/7 to 37 6/7 weeks of gestation, followed by administering antibiotic prophylaxis during labor for those women who test positive for GBS [2]. In this study, the gestational age at which screening occurred varied from 37 to 41 weeks, aligning closely with the existing clinical screening timeframe. Consequently, the model created in this research may more accurately represent practical scenarios of GBS screening during late pregnancy.
Previous studies have shown marked variation in GBS colonization rates and associated factors across countries, regions, and populations [1, 8]. Maternal age, obesity, irregular glucose metabolism, prior GBS colonization or infection, number of births, alterations in vaginal microecology, and various sociodemographic variables have been linked to GBS colonization, despite the inconsistency of results across different studies [10, 21–23]. In Xiamen, China, a study with a large sample size found a maternal GBS colonization rate of 13.47% and established a connection between diabetes and GBS colonization, while the link with maternal age was found to be variable [23]. A systematic review and meta-analysis published in 2024, which examined GDM in relation to GBS colonization, indicated that GDM might slightly elevate the risk of rectovaginal GBS presence [10]. Additional research has suggested that increased levels of prepregnancy obesity could be correlated with a higher likelihood of GBS colonization during pregnancy [21]. Collectively, these observations suggest that GBS positivity is probably not dictated by a single factor but rather could be shaped by a range of influences, including the metabolic and immune-inflammatory conditions of the host, the vaginal microenvironment, and behaviors associated with healthcare. Different from traditional studies of associated factors, the present study did not aim to determine whether any single variable was an independent causal risk factor. Rather, it focused on developing a risk prediction model for GBS screening positivity based on a combination of multiple variables. Therefore, the seven variables selected in this study should be interpreted as clinical features that contribute to model prediction, rather than as definite risk factors. This interpretive boundary is particularly important for machine learning-based prediction models, because variable importance may reflect genuine biological associations, but may also be affected by variable distributions, nonlinear relationships, interactions among variables, sample sources, and testing procedures.
The present study should also be interpreted within the broader integration of machine learning into obstetric and gynecologic practice. In recent years, machine learning has been increasingly used to support individualized risk prediction and decision support across different obstetric and gynecologic settings. For example, recent studies have applied machine learning models to predict postpartum hemorrhage using routinely available maternal clinical and biochemical parameters and to develop prediction models based on shear wave elastography-derived parameters in patients with endometrioma [24, 25]. These studies suggest that machine learning may help transform routinely collected clinical, laboratory, and imaging data into individualized risk estimates, thereby supporting precision-oriented decision-making in obstetrics and gynecology. In line with this emerging framework, our study extends the potential application of machine learning to GBS screening positivity in late pregnancy. However, similar to other machine learning-based models in obstetrics and gynecology, the present model should be regarded as an adjunctive risk-stratification tool rather than a replacement for established diagnostic standards, microbiological testing, or clinician judgment. External validation, calibration assessment, model recalibration when necessary, and clinical impact studies are required before such models can be safely integrated into routine care.
Predictive performance of the final random forest model
In this research, the random forest model demonstrated both the highest AUC and the lowest Brier score within the validation set, indicating a relatively strong capability in distinguishing between individuals who are GBS screening-positive and those who are GBS screening-negative, as well as in the agreement of probability predictions. Unlike logistic regression, the random forest method is able to identify possible nonlinear relationships and interactions among variables, potentially rendering it more adept for intricate prediction tasks that involve clinical variables, lab indicators, and characteristics related to infections [26]. In the validation dataset, the random forest model demonstrated an AUC of 0.868, a sensitivity of 0.841, and a specificity of 0.732, suggesting a certain level of discriminative capability within the internal validation context. Nonetheless, the performance of the final model should be interpreted cautiously. The validation set contained only 109 participants, including 27 GBS-positive cases. Therefore, the estimates of AUC, sensitivity, specificity, Brier score, calibration performance, and decision-curve performance may be statistically unstable and potentially optimistic. In addition to the limited size of the validation cohort, imbalance in baseline characteristics between the training and validation cohorts may also affect the interpretation of validation performance. Although stratified sampling was performed according to GBS screening status and the outcome distribution was comparable between the two cohorts, the proportion of primiparous women was higher in the validation cohort than in the training cohort. Primiparity was not selected as a final predictor in the model; however, it remains an important obstetric characteristic and may be related to pregnancy-related clinical features, antenatal care patterns, healthcare-seeking behavior, and other unmeasured factors. Therefore, this imbalance may influence the apparent validation performance and should be considered when interpreting the model’s generalizability. To evaluate the potential influence of this imbalance, we performed a propensity score weighting sensitivity analysis based on primiparity. After weighting, the balance of primiparity between the training and validation cohorts was substantially improved, and the validation performance remained broadly comparable, suggesting that the imbalance in primiparity did not materially alter the main validation findings. Nevertheless, this sensitivity analysis cannot replace multicenter external validation, and the transportability of the model remains to be confirmed in independent populations. Although the results in the validation set are promising, they do not imply that the model is suitable for clinical use. This study remains a single-center retrospective analysis with a constrained sample size, and the evaluation of the model relied on internal validation rather than multicenter external validation or prospective validation. Consequently, the present model should be viewed as an exploratory tool for risk stratification and should not replace established microbiological GBS screening. It should not serve as the sole factor for determining intrapartum antibiotic prophylaxis. In accordance with the Transparent Reporting of a Multivariable Prediction Model for Individual Prognosis or Diagnosis–Artificial Intelligence (TRIPOD + AI) reporting guideline, prediction model investigations must thoroughly detail data sources, candidate predictors, model development, validation, calibration, intended clinical use, and target populations, with rigorous validation essential prior to model implementation [27]. In addition, model transportability remains uncertain because the model was developed from a single-center Chinese population. Differences in maternal characteristics, regional GBS prevalence, antenatal care patterns, healthcare resources, laboratory testing methods, and clinical workflows may affect model performance when applied to other healthcare settings. Additional multicenter studies are required to externally validate, recalibrate, and prospectively evaluate the model across different regions, healthcare facilities, and GBS testing protocols.
Clinical interpretation of predictors and SHAP results
In interpreting the SHAP results, it is important to distinguish predictive contribution from causal inference. The present study was designed to develop a prediction model for GBS screening positivity, not to identify causal determinants of GBS colonization. Therefore, the variables retained in the final model should be interpreted as model-based predictive features. Their SHAP values indicate how much they contributed to the model output in this dataset, but they do not demonstrate etiological relationships, biological mechanisms, or causal effects. This distinction is particularly important for variables such as platelet count, gestational thyroid disease, education level, and type of vaginitis, which may reflect broader clinical, behavioral, healthcare-related, or unmeasured factors rather than direct causes of GBS screening positivity. SHAP analysis showed that platelet count had the highest mean absolute SHAP value in the random forest model, suggesting a relatively large contribution to model output. Platelets are involved not only in coagulation but also in inflammatory responses, immune regulation, and infection-related host responses [28]. In late pregnancy, platelet levels may be influenced by physiological changes in blood volume, inflammatory status, pregnancy complications, and individual heterogeneity [29, 30]. Therefore, the predictive contribution of platelet count may reflect differences in maternal host status during late pregnancy and may also be affected by unmeasured factors [30]. However, this study cannot demonstrate that changes in platelet count lead to GBS screening positivity, nor can it establish a specific biological mechanism. Platelet count should therefore be interpreted as a laboratory indicator that provides predictive information within the model, rather than as a causal determinant of positive GBS screening.
Lymphocyte count was also retained in the final model and showed a certain predictive contribution in the SHAP analysis. Lymphocyte levels may reflect individual immune status, inflammatory responses, and physiological immune adaptations during pregnancy, and may therefore provide predictive information within the model [31]. However, the relationship between lymphocyte count and the model-predicted probability of GBS screening positivity may be nonlinear and may also be influenced by other clinical factors. Therefore, lymphocyte count should be interpreted as a model-based predictive marker rather than as a simple linear risk factor or causal determinant of GBS screening positivity. Type of vaginitis and abnormal vaginal discharge were important variables related to recorded vaginal conditions in this study. Previous studies have suggested that GBS colonization may be associated with the composition of the vaginal microenvironment [22]. Vaginal microecological imbalance during pregnancy, bacterial vaginosis, and clinical manifestations such as abnormal discharge may reflect changes in the local mucosal environment [12]. Therefore, the contributions of type of vaginitis and abnormal vaginal discharge to model prediction may have some clinical plausibility as predictive signals and may reflect differences in recorded local vaginal conditions or infection-related clinical manifestations [32]. Nevertheless, these variables cannot replace microbiological testing, nor do they indicate that any specific type of vaginitis necessarily leads to GBS screening positivity. Education level was included in the final model, suggesting that sociodemographic characteristics may provide predictive information for the model. Education level may be related to health literacy during pregnancy, adherence to antenatal care, hygiene behaviors, timing of healthcare seeking, awareness of infection prevention and control, and access to medical resources [33]. Accordingly, the predictive contribution of education level in this study is more likely to reflect differences in social behavior and healthcare utilization rather than a direct biological effect. Gestational thyroid disease also showed a certain predictive contribution in the model. However, there is currently insufficient evidence to support a direct association between gestational thyroid disease and GBS colonization; therefore, this result should be regarded as an exploratory finding [34]. Gestational weight gain was also one of the important variables retained in the final model, and its predictive contribution may be related to metabolic background or overall health status during pregnancy [10, 35]. However, because this study did not comprehensively evaluate diet, physical activity, body fat distribution, glycemic control, or vaginal microbiota composition, the underlying explanation for this predictive contribution cannot be further clarified.
Overall, SHAP analysis improved the interpretability of the random forest model by showing how each predictor contributed to the predicted probability at both the population and individual levels. However, SHAP is a model explanation method rather than a causal inference method. The direction and magnitude of SHAP values are influenced by the study population, predictor distributions, correlations among variables, model structure, and unmeasured confounding. Therefore, the SHAP findings should be interpreted as explanations of model behavior in this dataset and should not be used to infer causal mechanisms or guide etiological conclusions regarding GBS colonization.
Potential clinical implications and application value of the web-based calculator
The potential clinical implication of this study is that it provides an auxiliary risk stratification approach based on routinely collected clinical information and laboratory indicators for GBS screening in late pregnancy. At present, standardized screening and intrapartum antibiotic prophylaxis remain the key strategies for preventing neonatal early-onset GBS disease. ACOG and related guidelines emphasize that GBS screening in late pregnancy, followed by intrapartum antibiotic prophylaxis for women with positive screening results, is an important strategy for reducing neonatal early-onset GBS disease [2]. Importantly, the model was not developed to reduce, replace, or triage away standard GBS screening. Rather, it should be considered only as a complementary decision-support tool within the existing screening pathway. Its possible value may include risk communication, screening adherence management, follow-up reminders, and research-oriented stratification, rather than diagnostic replacement or direct treatment decision-making. Based on the final random forest model, we further developed an online web-based risk calculator. The input variables included education level, platelet count, lymphocyte count, type of vaginitis, abnormal vaginal discharge, gestational thyroid disease, and gestational weight gain. The calculator outputs the individualized predicted probability of GBS screening positivity, risk stratification results, and individualized SHAP explanations. This tool may improve the visualization and interpretability of model results and provide a basis for subsequent external validation and model updating studies. However, the web-based calculator is currently intended only for research demonstration, visualization of model predictions, and preparation for future external validation. It is not ready for independent clinical use. It should not be used to determine whether microbiological GBS testing is needed, nor should it guide intrapartum antibiotic prophylaxis or other clinical decisions. Before further promotion or public clinical application, the calculator should undergo validation, recalibration, and clinical impact assessment in independent external populations.
Strengths and limitations
This research presents multiple strengths. Firstly, it centers on the well-defined clinical setting of GBS screening during the later stages of pregnancy. The variables analyzed included demographic details, obstetric history, complications related to pregnancy, clinical symptoms associated with infections, and laboratory markers, which are generally easy to obtain in standard clinical settings. Secondly, variable selection was performed using LASSO regression alongside the Boruta algorithm, which enabled the study to not only reduce variables but also evaluate the robustness of the features that predict outcomes. Thirdly, a comparison was made among seven prevalent machine learning techniques and traditional models, with the ultimate model chosen through various assessment methods such as out-of-fold cross-validation, validation set analysis, AUC, Brier score, calibration graphs, and decision curves, thus avoiding dependence on a singular performance variable. Fourthly, SHAP analysis was utilized for both global and individual interpretation, enhancing the random forest model’s transparency and clinical interpretability. Lastly, the creation of a web-based calculator establishes a basis for the model’s presentation, future external validation, and ongoing exploration of practical applications.
This research has several limitations. Firstly, it was a retrospective study conducted at a single center with a relatively small sample size. All participants were sourced from the same medical facility, which might have led to selection bias, information bias, and specific regional influences. Consequently, the applicability of the model should be viewed with caution. Secondly, while the dataset was split into training and validation sets, the validation set originated from the same single-center data source, thus reflecting internal validation instead of genuine external validation. Furthermore, the validation set comprised only 27 events that tested positive for GBS screening. This limited number of events may have resulted in statistically unstable estimates of discrimination, classification performance, calibration, and decision-curve analysis, and may also have contributed to an optimistic assessment of model performance. Therefore, the reported AUC, sensitivity, specificity, Brier score, calibration performance, and net benefit should be interpreted cautiously. At the overall model-development level, the total sample size was also limited, with 363 participants and 91 GBS-positive events. Although the final model included seven predictors and the events-per-variable value was 13.0, meeting the commonly used minimum rule of thumb of 10 events per predictor, this threshold may still be insufficient for complex machine learning models. In addition, bootstrap optimism correction suggested that the apparent performance of the model was optimistic. Therefore, despite the relatively high optimism-corrected AUC, the model may still be prone to overfitting, and its performance should be interpreted cautiously until it is externally validated and recalibrated in larger, multicenter populations. Thirdly, the transportability of the model remains uncertain because it was developed from a single-center Chinese population. Differences in maternal characteristics, regional GBS prevalence, antenatal care practices, healthcare resources, laboratory testing procedures, and clinical workflows may affect model performance when applied to other regions or healthcare settings. Therefore, multicenter external validation and, if necessary, model recalibration are required before broader clinical application. Fourth, the use of LASSO, Boruta, and multi-model comparisons involved data-driven techniques. Given the limited sample size and event number, these methods could heighten the possibility of predictor selection instability, model uncertainty, overfitting, and overly optimistic performance estimation. Fifth, some variables were obtained from electronic medical records and routine clinical records, which may be subject to incomplete documentation, measurement error, or classification error. Because only participants with complete clinical data were included, selection bias may still be present. Sixth, although combined vaginal–rectal sampling was performed for all participants, GBS testing methods included both culture and PCR/NAAT. Differences in testing methods and laboratory workflows may have affected the positive detection rate. Seventh, this study focused primarily on predicting positive GBS screening and did not further include maternal or neonatal outcomes, such as neonatal early-onset GBS disease, premature rupture of membranes, preterm birth, chorioamnionitis, or puerperal infection. Therefore, the predictive value of the model for clinically important outcomes could not be evaluated. Eighth, SMOTE altered the outcome class distribution in the training set. Although this approach helped mitigate class imbalance, it may also affect model calibration and the interpretation of predicted probabilities in real-world populations. Nevertheless, SMOTE may alter the apparent outcome prevalence in the training process and may influence the calibration of predicted probabilities, particularly in clinical prediction models where accurate absolute risk estimation is important. Although calibration was evaluated in the original validation set, the predicted probabilities of the final model should still be interpreted cautiously. Alternative approaches for handling class imbalance, such as class weighting, threshold adjustment, cost-sensitive learning, or model development without oversampling, were not systematically compared in the present study. Future studies with larger multicenter datasets should compare these strategies, evaluate their effects on discrimination and calibration, and perform recalibration when necessary before clinical application. Ninth, this study did not include detailed information on vaginal microbiota composition, antibiotic exposure history, glycemic control, sexual behavior, or hygiene practices, which may limit the completeness of predictive information captured by the model. Tenth, although SHAP analysis improved model interpretability, it remains a model explanation method and cannot establish causal mechanisms between predictors and GBS screening positivity. The identified predictors should therefore be interpreted as contributors to model output rather than causal determinants of GBS colonization. Finally, neither the current model nor the web-based calculator has undergone prospective validation, decision impact analysis, or clinical benefit evaluation. Therefore, it remains some distance from practical clinical implementation.
Future research directions
Future research may further improve this work in several ways. First, multicenter, large-sample, prospective studies should be conducted to validate the stability, calibration, and clinical applicability of the model across different regions, different levels of healthcare institutions, and different GBS testing procedures. Second, future studies may incorporate vaginal microbiota composition, history of antibiotic use, glycemic control, inflammatory markers, and more detailed obstetric outcomes to evaluate whether the predictive information captured by the model can be further enhanced. Third, model updating and recalibration should be performed after external validation to clarify the target population, prediction time point, threshold selection, and risk stratification criteria. Fourth, future research should assess whether the model can improve screening adherence, optimize perinatal management workflows, or enhance the efficiency of risk communication through decision impact studies, rather than focusing solely on statistical performance metrics.
Conclusion
Using routinely collected clinical data from late-pregnancy women, this study developed and compared multiple risk prediction models for GBS screening positivity. The final random forest model demonstrated a certain degree of discrimination, calibration performance, and potential clinical net benefit in the internal validation set. SHAP analysis indicated that platelet count, type of vaginitis, gestational weight gain, gestational thyroid disease, lymphocyte count, education level, and abnormal vaginal discharge contributed to the model output to varying degrees. It should be emphasized that these variables mainly reflect predictive value and model interpretation information, and they should not be directly regarded as definite risk factors or causal factors. The model developed in this study may provide exploratory support for risk stratification, screening adherence management, and risk communication regarding positive GBS screening in late pregnancy within the existing universal screening framework. However, it cannot replace standard microbiological GBS screening, culture- or NAAT-based testing, clinician judgment, or guideline-based intrapartum antibiotic prophylaxis decisions. Multicenter external validation, recalibration, prospective evaluation, and clinical impact studies are required before clinical implementation.
Supplementary Information
Supplementary Material 1: Supplementary Table S1. Variable definitions and coding.
Acknowledgements
Not applicable.
Authors’ contributions
Fangfang Liu and Lixia Wu contributed equally to this work and shared the first authorship. Fangfang Liu: Conceptualization, Methodology, Data Curation, Investigation, Writing - Original Draft; Lixia Wu: Conceptualization, Methodology, Formal analysis, Software, Writing - Original Draft; Fang Li: Conceptualization, Formal analysis, Validation, Writing - Review & Editing; Qianqian He: Methodology, Formal analysis, Validation, Writing - Original Draft; Xiaofen Duan: Methodology, Data Curation, Investigation, Writing - Review & Editing; Jing Gao: Data Curation, Software, Validation, Investigation, Writing - Review & Editing. All authors have read and approved the final manuscript.
Funding
The study was supported by the Medical Scientific Research Project of Hebei Provincial Health Commission [Grant number: 20271169].
Data availability
The datasets used and/or analysed during the current study are available from the corresponding author on reasonable request.
Declarations
Ethics approval and consent to participate
This study was conducted in accordance with the Declaration of Helsinki and was approved by the Ethics Committee of The Fourth Hospital of Shijiazhuang (approval number: 20260018). All procedures involving human participants complied with institutional and national ethical standards. Participant privacy and data confidentiality were strictly protected throughout the study.
Consent for publication
Not applicable.
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Fangfang Liu and Lixia Wu contributed equally to this work and shared the first authorship.
References
- 1.Wang J, Zhang Y, Lin M, Bao J, Wang G, Dong R, et al. Maternal colonization with group B Streptococcus and antibiotic resistance in China: systematic review and meta-analyses. Ann Clin Microb Anti. 2023;22(1):5. 10.1186/s12941-023-00553-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Prevention of Group B Streptococcal Early-Onset Disease in Newborns ACOG Committee Opinion, Number 797. Prevention of Group B Streptococcal Early-Onset Disease in Newborns: ACOG Committee Opinion, Number 797. Obstet Gynecol. 2020;135(2):e51–72. 10.1097/AOG.0000000000003668. [DOI] [PubMed] [Google Scholar]
- 3.Gon Alves BP, Procter SR, Paul P, Chandna J, Lewin A, Seedat F, et al Group B streptococcus infection during pregnancy and infancy: estimates of regional and global burden. Lancet Global health. 2022;10(6):e807–19. 10.1016/S2214-109X(22)00093-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Horváth-Puhó E, van Kassel MN, Gon Alves BP, de Gier B, Procter SR, Paul P, et al. Mortality, neurodevelopmental impairments, and economic outcomes after invasive group B streptococcal disease in early infancy in Denmark and the Netherlands: a national matched cohort study. Lancet Child Adolesc health. 2021;5(6):398–407. 10.1016/S2352-4642(21)00022-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Manuel G, Twentyman J, Noble K, Eastman AJ, Aronoff DM, Seepersaud R, et al Group B streptococcal infections in pregnancy and early life. Clin Microbiol Rev. 2025;38(1):e15422. 10.1128/cmr.00154-22. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Morgan JA, Zafar N, Cooper DB. Group B Streptococcus and Pregnancy. StatPearls. Treasure Island (FL): StatPearls Publishing; 2026. [PubMed] [Google Scholar]
- 7.Panneflek TJR, Hasperhoven GF, Chimwaza Y, Allen C, Lavin T, Te Pas AB, et al. Intrapartum antibiotic prophylaxis to prevent Group B streptococcal infections in newborn infants: a systematic review and meta-analysis comparing various strategies. Eclinicalmedicine. 2024;74:102748. 10.1016/j.eclinm.2024.102748. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Kwatra G, Izu A, Cutland C, Akaba G, Ali MM, Ahmed Z, et al. Prevalence of group B Streptococcus colonisation in mother-newborn dyads in low-income and middle-income south Asian and African countries: a prospective, observational study. Lancet Microbe. 2024;5(10):100897. 10.1016/S2666-5247(24)00129-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Mercado-Evans V, Mejia ME, Zulk JJ, Ottinger S, Hameed ZA, Serchejian C, et al Gestational diabetes augments group B Streptococcus infection by disrupting maternal immunity and the vaginal microbiota. Nat Commun. 2024;15(1):1035. 10.1038/s41467-024-45336-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Mercado-Evans V, Zulk JJ, Hameed ZA, Patras KA Gestational diabetes as a risk factor for GBS maternal rectovaginal colonization: a systematic review and meta-analysis. BMC Pregnancy Childb. 2024;24(1):488. 10.1186/s12884-024-06694-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Wu M, Deng Y, Wang X, He B, Wei F, Zhang Y. Development of risk prediction nomogram for neonatal sepsis in Group B Streptococcus-colonized mothers: a retrospective study. Sci Rep-UK. 2024;14(1):5629. 10.1038/s41598-024-55783-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Yu W, Sun M, Li R, Xin Y, Zheng K Unveiling the microbial shift: the impact of group B Streptococcus on vaginal microbiota and inflammation in late pregnancy. BMC Microbiol. 2025;25(1):640. 10.1186/s12866-025-04387-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Perinatal Medicine Branch of the Chinese Medical Association. Chinese experts consensus on prevention of perinatal group B Streptococcal disease. Chin J Perinat Med. 2021;24(8):561–6. 10.3760/cma.j.cn113903-20210716-00638. Obstetrics Group of the Obstetrics and Gynecology Branch of the Chinese Medical Association. [DOI] [Google Scholar]
- 14.Friedman J, Hastie T, Tibshirani R. Regularization Paths for Generalized Linear Models via Coordinate Descent. J Stat Softw. 2010;33(1):1–22. [PMC free article] [PubMed] [Google Scholar]
- 15.Huang X, Zhang L, Zhang C, Li J, Li C. Postpartum depression risk prediction using explainable machine learning algorithms. Front Med-Lausanne. 2025;12:1565374. 10.3389/fmed.2025.1565374. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Riley RD, Ensor J, Snell KIE, Harrell FEJ, Martin GP, Reitsma JB et al. Calculating the sample size required for developing a clinical prediction model. BMJ (Clinical research ed.). 2020;368:m441. 10.1136/bmj.m441. [DOI] [PubMed]
- 17.van den Goorbergh R, van Smeden M, Timmerman D, Van Calster B. The harm of class imbalance corrections for risk prediction models: illustration and simulation using logistic regression. J Am Med Inf Association: JAMIA. 2022;29(9):1525–34. 10.1093/jamia/ocac093. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Brnabic A, Hess LM. Systematic literature review of machine learning methods used in the analysis of real-world data for patient-provider decision making. BMC Med Inf Decis. 2021;21(1):54. 10.1186/s12911-021-01403-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Christodoulou E, Ma J, Collins GS, Steyerberg EW, Verbakel JY, Van Calster B. A systematic review shows no performance benefit of machine learning over logistic regression for clinical prediction models. J Clin EpidemioL. 2019;110:12–22. 10.1016/j.jclinepi.2019.02.00. [DOI] [PubMed] [Google Scholar]
- 20.Ponce-Bobadilla AV, Schmitt V, Maier CS, Mensing S, Stodtmann S. Practical guide to SHAP analysis: Explaining supervised machine learning model predictions in drug development. Clin Transl Sci. 2024;17(11):e70056. 10.1111/cts.70056. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Venkatesh KK, Vladutiu CJ, Strauss RA, Thorp JM, Stringer JSA, Stamilio DM et al. Association Between Maternal Obesity and Group B Streptococcus Colonization in a National U.S. Cohort. J Women’s Health (2002). 2020;29(12):1507-12. 10.1089/jwh.2019.8139. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Maidment TI, Pelzer ES, Borg DJ, Cheung E, Begun J, Nitert MD, et al. Group B Streptococcus vaginal colonisation throughout pregnancy is associated with decreased Lactobacillus crispatus and increased Lactobacillus iners abundance in the vaginal microbial community. Front Cell Infect Mi. 2024;14:1435745. 10.3389/fcimb.2024.1435745. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Chen X, Cao S, Fu X, Ni Y, Huang B, Wu J, et al. The risk factors for Group B Streptococcus colonization during pregnancy and influences of intrapartum antibiotic prophylaxis on maternal and neonatal outcomes. BMC Pregnancy Childb. 2023;23(1):207. 10.1186/s12884-023-05478-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Zorlu U, Altınsoy H, Okutucu G, Orhan N, Tanaçan A, Şahin D. Machine learning-based prediction of postpartum hemorrhage using maternal clinical and biochemical features. Int J Gynaecol Obstet. 2026;172(3):1776–83. 10.1002/ijgo.70609. [DOI] [PubMed] [Google Scholar]
- 25.Zorlu U, Yılmazer-Zorlu SN, Halilzade İ, Turgay B, Ünsal M. Shear wave elastography values in endometrioma: Clinical findings and machine learning-based prediction models. Int J Gynaecol Obstet. 2025;171(1):371–81. 10.1002/ijgo.70159. [DOI] [PubMed] [Google Scholar]
- 26.Andaur Navarro CL, Damen JAA, van Smeden M, Takada T, Nijman SWJ, Dhiman P, et al. Systematic review identifies the design and methodological conduct of studies on machine learning-based prediction models. J Clin Epidemiol. 2023;154:8–22. 10.1016/j.jclinepi.2022.11.015. [DOI] [PubMed] [Google Scholar]
- 27.Collins GS, Moons KGM, Dhiman P, Riley RD, Beam AL, Van Calster B, et al. TRIPOD + AI statement: updated guidance for reporting clinical prediction models that use regression or machine learning methods. BMJ Clinical research ed. 2024;385:e78378. 10.1136/bmj-2023-078378. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Portier I, Campbell RA. Role of Platelets in Detection and Regulation of Infection. Arterioscler Thromb Vasc Biol. 2021;41(1):70–8. . 10.1161/ATVBAHA.120.314645. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Habas ES, Rayani A, Alfitori G, Eldin Ahmed G, Elzouki AY. Gestational Thrombocytopenia: A Review on Recent Updates. Cureus J Med Sci. 2022;14(3):e23204. 10.7759/cureus.23204. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30.Park YH. Diagnosis and management of thrombocytopenia in pregnancy. Blood Res. 2022;57(S1):79–85. 10.5045/br.2022.2022068. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31.Ngelo-Dias M, Martins CG, Mata M, Barata M, Chung A, Sarzedas S, et al. Immunological reference intervals in pregnancy: longitudinal analysis of adaptive lymphocyte subsets. Front Immunol. 2025;16:1634176. 10.3389/fimmu.2025.1634176. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Chen X, Lu Y, Chen T, Li R. The Female Vaginal Microbiome in Health and Bacterial Vaginosis. Front Cell Infect Mi. 2021;11:631972. 10.3389/fcimb.2021.631972. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Nawabi F, Krebs F, Vennedey V, Shukri A, Lorenz L, Stock S. Health Literacy in Pregnant Women: A Systematic Review. Int J Environ Res Public Health. 2021;18(7):3847. 10.3390/ijerph18073847. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Bogovi Crn IT, Urko-Cofek BE, Bati IL, Girotto N, Toma MI, Kr Ek A, et al. Autoimmune Thyroid Disease and Pregnancy: The Interaction Between Genetics, Epigenetics and Environmental Factors. J Clin Med. 2024;14(1):190. 10.3390/jcm14010190. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 35.Champion ML, Harper LM. Gestational Weight Gain: Update on Outcomes and Interventions. Curr Diabetes Rep. 2020;20(3):11. 10.1007/s11892-020-1296-1. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Supplementary Material 1: Supplementary Table S1. Variable definitions and coding.
Data Availability Statement
The datasets used and/or analysed during the current study are available from the corresponding author on reasonable request.
