Vitamin D3 for Life. Live Enlightened.

Research libraryVitamin D3 For Life
Study design and methods

Secondary relevance to vitamin D This paper mainly addresses another topic and also reports a vitamin D analysis, result or scientific synthesis.

This paper mainly addresses another topic and also reports a vitamin D analysis, result or scientific synthesis.

Why this paper is included

Supporting source evidence:

Compared with the No-GHT group, the GHT group had lower levels of Zn, Fe, Ca, P, Mg, vitA, vitD, vitE, vitD3, and ALB, and a higher level of Cu, with unadjusted P < 0.05.

Source: Patient characteristics. View original paper

Relevance classification does not establish study quality, causation or editorial approval.

Study design Observational study.

Observational study

Observes exposures and outcomes without assigning the exposure; the subtype is not established here.

Meta-analysis unclear · Blinding unclear / not reported · Human research reported

How this paper was classified

Automatic source-based classification; awaiting editorial verification. This is not a quality score.

This single-center retrospective observational study included 407 pregnant women without GHT at baseline, including 164 with incident GHT and 243 without GHT during follow-up.

Source: Abstract.

Participants were classified as non-GHT if no available post-baseline thyroid function record or prenatal follow-up information met the diagnostic criteria for GHT.

Source: Methods.

View supporting evidence in the original paper

What the study types mean
Systematic review
Uses explicit methods to identify, assess and summarise research on a defined question.
Scoping review
Maps the extent and characteristics of research on a topic.
Narrative review
Discusses existing research; systematic-review methods have not been established by this classification.
Review / evidence synthesis
Reviews existing research; the exact review methods need further assessment.
Randomised controlled trial
Assigns participants or groups to comparison interventions by chance.
Non-randomised intervention study
Examines an intervention without random allocation.
Cohort study
Examines exposures and outcomes over time within a defined group.
Case-control study
Compares people with an outcome against people without it, examining exposures.
Cross-sectional study
Examines a population at a particular point in time.
Observational study
Observes exposures and outcomes without assigning the exposure; the subtype is not established here.
Case report
Describes an individual case.
Case series
Describes a group of individual cases.
Secondary analysis
Analyses existing study data; this paper is not automatically another independent trial.
Laboratory study
Investigates biological processes in a laboratory setting.
Qualitative study
Examines experiences or meanings using qualitative methods.
Genetic instrumental-variable study
Uses genetic variation as an instrument to investigate relationships; this is not a randomised treatment trial.
Study protocol
Describes planned methods and is not evidence that the planned study has reported results.
Multiple reported designs
More than one design is explicitly reported; examine the supporting methods.
Study design awaiting verification
The available source does not establish a sufficiently clear study design.

Meta-analysis combines numerical results from studies. Blinding describes who was unaware of treatment allocation. Neither is a separate quality grade. Study design, vitamin D relevance and document format are independent filters.

Full studies

Development and validation of an interpretable machine learning model for predicting incident gestational hypothyroidism using clinical laboratory markers

Observational study · Frontiers in Medicine · 2026

Original publication title

Development and validation of an interpretable machine learning model for predicting incident gestational hypothyroidism using clinical laboratory markers

Liran Shen; Ru Liu; Yunbiao Zhang; Qingkai Wang; Zhiqiang Zhang; Mengting Li

Copyright © 2026 Shen, Liu, Zhang, Wang, Zhang and Li.

Original publication · Publisher record · CC BY 4.0

Source wording retained. Formatting, section navigation and display-title punctuation adapted for this research record.

At a glance

Abstract: What objectives does the paper state?

Traditional risk factors have limited performance for early identification of gestational hypothyroidism (GHT), and evidence remains limited on prediction using clinical laboratory markers.

Source: Objective

Study methods

What methods does the paper describe?

Study design, participants, and outcome ascertainment

This single-center retrospective study was designed for prediction model development and internal validation. De-identified electronic medical records and laboratory information system data were used to retrospectively screen pregnant women who had their first eligible prenatal visit between 2021 and 2025. The first eligible visit was defined as the earliest visit during the current pregnancy at which the participant did not meet the diagnostic criteria for GHT and had the clinical and laboratory variables required for model development.

A total of 407 pregnant women with available post-baseline thyroid function records or prenatal follow-up information sufficient for outcome ascertainment were included in the final analytic dataset, including 164 who developed incident GHT and 243 who did not. The observed event fraction of 40.3% reflects the outcome distribution of the analytic dataset and was not intended to estimate the population incidence of incident GHT among unselected pregnant women. All data were obtained from the hospital’s electronic medical record and laboratory information systems.

After extraction, all study data were de-identified and used only for statistical analysis and model development. Given the retrospective design and absence of additional intervention, informed consent was waived. The study was approved by the Medical Ethics Committee of Shanxian Central Hospital (approval number: LL 2026022).

The GHT group included overt hypothyroidism and subclinical hypothyroidism. According to current clinical guidelines for thyroid disease during pregnancy, overt hypothyroidism was defined as elevated TSH with decreased FT4, and subclinical hypothyroidism was defined as elevated TSH with FT4 within the reference range. In this study, GHT was defined as TSH > 4.20 μIU/mL after the first eligible visit, with FT4 < 12 pmol/L for overt hypothyroidism and FT4 within 12–22 pmol/L for subclinical hypothyroidism (22). Outcome status was determined from available retrospective post-baseline records.

Incident GHT was defined as the first post-baseline thyroid function result that met the diagnostic criteria for overt or subclinical hypothyroidism. Participants were classified as non-GHT if no available post-baseline thyroid function record or prenatal follow-up information met the diagnostic criteria for GHT.

The inclusion criteria were as follows: (1) completion of thyroid function testing and concurrent clinical laboratory tests required for model development at the first visit during the current pregnancy, without meeting the diagnostic criteria for GHT at that visit; (2) availability of subsequent thyroid function retesting or clinical follow-up data sufficient to determine whether incident GHT occurred after the first visit; (3) availability of baseline clinical data and laboratory measurements required for model development; and (4) for participants with multiple visit records, retention of only the first record that met the inclusion criteria and contained complete data.

The exclusion criteria were as follows: (1) confirmed thyroid disease before pregnancy or long-term use of thyroid-related treatment, including levothyroxine; (2) fulfillment of the diagnostic criteria for GHT at the first visit; (3) comorbid conditions that could affect thyroid function, trace element metabolism, nutritional status, or inflammatory status, including severe hepatic or renal dysfunction, hematologic diseases, autoimmune diseases, and malignant tumors; (4) acute infection, systemic inflammatory response, or other acute stress states; and (5) substantial missingness in key variables or inability to determine the follow-up outcome.

Candidate predictors and missing-data handling

All study variables were extracted from the electronic medical record system and laboratory information system at the first visit. Candidate predictors were selected according to clinical relevance, availability in the hospital electronic medical record and laboratory information systems, and prior evidence. These variables included general clinical characteristics, trace elements and minerals, vitamin-related markers, biochemical metabolic markers, and hematologic markers. General clinical characteristics included age and gestational week (GW) at the first visit. Trace elements and minerals included zinc (Zn), iron (Fe), copper (Cu), calcium (Ca), phosphorus (P), and magnesium (Mg).

Vitamin-related markers included vitamin A (vitA), vitamin D (vitD), vitamin E (vitE), and vitamin D3 (vitD3). Biochemical metabolic markers included albumin (ALB), alanine aminotransferase (ALT), alkaline phosphatase (ALP), total bile acid (TBA), urea (UREA), glucose (GLU), cholyglycine (CG), aspartate aminotransferase (AST), creatinine (CREA), uric acid (UA), lactate dehydrogenase (LDH), and gamma-glutamyl transferase (GGT). Hematologic markers included white blood cell count (WBC), neutrophil count (NEUT), lymphocyte count (LYMPH), red blood cell count (RBC), platelet count (PLT), mean corpuscular volume (MCV), mean corpuscular hemoglobin (MCH), and mean corpuscular hemoglobin concentration (MCHC).

Missing data patterns were assessed before imputation and are summarized in Supplementary Table S1. A total of 72 participants had at least one missing value, corresponding to 111 missing values in the original dataset. The highest missing proportion was observed for phosphorus (P; 4.18%), followed by lactate dehydrogenase (LDH; 3.44%) and zinc (Zn; 3.44%). Among the final retained predictors, missingness ranged from 0 to 3.44%. Missing values were handled using multiple imputation by chained equations (MICE), with five imputed datasets generated using a fixed random seed of 123.

Multiple imputation was used to reduce sample loss, loss of statistical power, and potential selection bias from complete-case analysis. The imputed data were then used for subsequent feature selection, model development, and validation analyses. To reduce information leakage, the training and validation sets were first separated, and preprocessing procedures, including imputation and standardization, were implemented within the modeling workflow.

Feature selection strategy

To reduce redundancy and potential multicollinearity among candidate predictors and improve model stability, this study used a feature selection strategy that combined Least Absolute Shrinkage and Selection Operator (LASSO) regression, the Boruta algorithm, and random forest variable-importance ranking. This combined strategy was chosen to reduce reliance on a single feature-selection algorithm and to identify predictors with stable contributions across both penalized regression and tree-based importance measures. All feature selection procedures were performed in the training set.

First, LASSO regression was applied to candidate variables in the training set using the glmnet package. A penalty term was imposed on the regression coefficients to perform variable shrinkage and dimensionality reduction. The optimal penalty parameter λ was determined using 10-fold cross-validation. Variables with coefficients shrunk to zero were excluded. Subsequently, the Boruta algorithm, based on the random forest framework, was applied to the candidate features to assess variable importance. This algorithm constructs shadow features and compares the importance distributions of real and shadow features to identify variables with stable discriminative value across repeated training.

In parallel, a random forest model was used to compute importance scores for candidate variables and rank them by their contribution to the classification task. Finally, the results from LASSO regression, the Boruta algorithm, and random forest variable-importance ranking were integrated to define the core feature subset for subsequent machine-learning model development. A Spearman correlation heatmap was generated to assess the correlation structure among the selected features and to examine whether marked clusters of high correlation were present.

Model development and evaluation

After feature selection, the final feature subset was used as input variables to develop machine learning models for predicting incident GHT. The final analytic dataset was divided into a training set and an internal validation set at an approximate 7:3 ratio. The training set included 286 participants, comprising 115 women with incident GHT and 171 women without GHT. The internal validation set included 121 participants, comprising 49 women with incident GHT and 72 women without GHT.

The evaluated models included RandomForest, support vector machine with kernel function (SVM_Kernel), logistic regression model (LogisticModel), neighbor-based method (NeighborMethod), partial least squares model (PLSModel), BoostingMethod, neural network model (NeuralNet), Bayesian model (BayesMethod), DiscriminantModel, Least Absolute Shrinkage and Selection Operator model (Lasso), Adaptive Boosting, and Light Gradient Boosting Machine (LightGBM). To ensure comparability across models, all models were trained and evaluated using the same data partition, input features, and preprocessing workflow. For threshold-dependent performance metrics, including accuracy, PPV, sensitivity, specificity, F1 score, Youden’s J statistic, and NPV, predicted probabilities were converted into binary classifications using a prespecified probability cutoff of 0.5.

Participants with predicted probabilities ≥ 0.5 were classified as GHT, whereas those with predicted probabilities < 0.5 were classified as non-GHT. No class weighting, oversampling, undersampling, SMOTE, or other resampling strategy was applied during model training. Model discrimination was assessed using the receiver operating characteristic (ROC) curve and the AUC, with 95% CIs calculated for the AUC. Classification performance was evaluated using accuracy, positive predictive value (PPV), sensitivity, specificity, F1 score, Youden’s J statistic, and negative predictive value (NPV). Model calibration was assessed using calibration curves and quantitative calibration metrics, including the Brier score, calibration intercept, and calibration slope.

Potential clinical utility was assessed using decision curve analysis (DCA) and clinical impact curves. Prediction error distributions were further examined through residual analysis, including reverse-cumulative absolute residual curves and residual box plots. The final model was selected according to overall performance rather than validation AUC alone, with consideration of discrimination, threshold-dependent classification performance, calibration, clinical net benefit, residual distribution, and interpretability.

SHAP-based model interpretation and visualization

To improve the interpretability of the final prediction model, SHAP was used to interpret model outputs. SHAP was selected because it provides both global and individual-level explanations, allowing the relative importance, direction, and magnitude of each predictor’s contribution to be visualized. SHAP analysis quantified the direction and magnitude of each input feature’s contribution to the predicted outcome and assessed the relative role of each variable in the prediction process. First, the mean absolute SHAP value for each variable was computed to assess global feature importance, and the variables were ranked accordingly.

A SHAP summary plot was generated to display the distribution of feature values and the direction of their effects on model output. SHAP dependence plots were then generated to examine the relationship between individual variables and model output. At the individual level, SHAP waterfall and force plots were used to present the composition of the prediction for a single sample and to visualize the positive or negative contribution of each variable to the predicted value.

Statistical analysis

Basic statistical analyses and model-related calculations were performed using SPSS version 27.0 and R version 4.5.1. The main R packages used for model development and feature selection included lightgbm version 4.6.0, Boruta version 8.0.0, and glmnet version 4.1–10. SHAP-based interpretation analyses were performed in Python version 3.12 using the shap package version 0.51.0. Continuous variables with a normal distribution were reported as mean ± standard deviation (SD) and compared between groups using the independent-samples t-test. Continuous variables with non-normal distributions were reported as medians and interquartile ranges (IQRs) and compared between groups using the Wilcoxon rank-sum test.

Categorical variables were reported as n (%) and compared between groups using the χ2 test or Fisher’s exact test, as appropriate. All statistical tests were two-sided, and P < 0.05 was considered statistically significant. For baseline characteristics in Table 1, P-values were reported as descriptive unadjusted comparisons, and no multiple-comparison correction was applied. These baseline comparisons were not used as the sole basis for predictor selection.

TABLE 1

Baseline characteristics.

VariablesTotal (N = 407)No-GHT (N = 243)GHT (N = 164)P-value
Age (years)30.00 (27.00, 34.00)30.00 (27.00, 34.00)30.00 (27.00, 34.00)0.603
GW (weeks)10.00 [9.00, 12.00]10.00 [8.00, 12.00]11.00 (9.00, 13.00)< 0.001
Zn (μmol/L)114.52 ± 19.69119.81 ± 18.33106.68 ± 19.06< 0.001
Fe (mmol/L)8.93 ± 1.029.15 ± 0.968.60 ± 1.03< 0.001
Cu (μmol/L)24.46 ± 4.7123.35 ± 4.5026.11 ± 4.53< 0.001
Ca (mmol/L)2.27 ± 0.082.29 ± 0.072.25 ± 0.07< 0.001
P(mmol/L)1.02 ± 0.101.04 ± 0.091.01 ± 0.100.004
Mg (mmol/L)0.84 (0.81, 0.87)0.85 (0.82, 0.87)0.84 (0.80, 0.86)0.003
vitA (ng/mL)0.36 ± 0.060.37 ± 0.060.35 ± 0.05< 0.001
vitD (ng/mL)40.57 ± 6.7341.75 ± 6.5838.83 ± 6.57< 0.001
vitE (ng/mL)6.37 ± 1.056.54 ± 1.036.10 ± 1.03< 0.001
vitD3 (pg/mL)34.15 ± 5.2134.72 ± 5.1033.32 ± 5.290.008
ALB (g/L)40.65 ± 2.9441.32 ± 2.7739.67 ± 2.92< 0.001
ALT (U/L)14.90 (11.00, 18.45)14.00 (10.30, 17.05)16.40 (13.17, 19.83)< 0.001
ALP (U/L)69.50 (56.95, 80.90)64.70 (52.45, 75.60)76.55 (66.18, 89.43)< 0.001
TBA (μmol/L)2.34 (1.86, 2.91)2.34 (1.85, 2.92)2.33 (1.90, 2.89)0.950
UREA (mmol/L)2.88 ± 0.602.86 ± 0.632.91 ± 0.560.429
GLU (mmol/L)4.73 ± 0.564.73 ± 0.584.73 ± 0.520.988
CG (μg/mL)3.48 ± 0.913.47 ± 0.873.50 ± 0.960.689
AST (U/L)18.29 ± 4.0817.86 ± 4.0218.92 ± 4.100.010
CREA (μmol/L)45.28 ± 6.8745.38 ± 6.7345.13 ± 7.090.716
UA (μmol/L)214.89 ± 30.12211.59 ± 29.37219.78 ± 30.630.007
LDH (U/L)148.60 (135.95, 162.95)145.40 (132.40, 159.60)154.05 (143.05, 169.48)< 0.001
GGT (U/L)11.97 ± 3.0911.66 ± 3.1112.43 ± 3.010.014
WBC ( × 109/L)8.66 ± 1.228.45 ± 1.188.98 ± 1.21< 0.001
NEUT ( × 109/L)5.60 ± 1.005.37 ± 0.935.94 ± 1.00< 0.001
LYMPH ( × 109/L)1.91 ± 0.381.95 ± 0.381.85 ± 0.390.010
RBC ( × 1012/L)4.28 ± 0.344.29 ± 0.334.26 ± 0.350.512
PLT ( × 109/L)270.16 ± 33.20274.27 ± 33.33264.07 ± 32.150.002
MCV (fL)87.71 ± 4.8687.64 ± 5.0287.82 ± 4.640.724
MCH (pg)29.94 ± 1.8129.97 ± 1.7929.90 ± 1.850.707
MCHC (g/L)338.00 (331.00, 345.00)337.00 (330.00, 343.00)341.00 (333.00, 347.00)0.003

GW, gestational week; Zn, zinc; Fe, iron; Cu, copper; Ca, calcium; P, phosphorus; Mg, magnesium; vitA, vitamin A; vitD, vitamin D; vitE, vitamin E; vitD3, vitamin D3; ALB, albumin; ALT, alanine aminotransferase; ALP, alkaline phosphatase; TBA, total bile acid; UREA, urea; GLU, glucose; CG, cholyglycine; AST, aspartate aminotransferase; CREA, creatinine; UA, uric acid; LDH, lactate dehydrogenase; GGT, gamma-glutamyl transferase; WBC, white blood cell count; NEUT, neutrophil count; LYMPH, lymphocyte count; RBC, red blood cell count; PLT, platelet count; MCV, mean corpuscular volume; MCH, mean corpuscular hemoglobin; MCHC, mean corpuscular hemoglobin concentration; GHT, gestational hypothyroidism.

Source: Materials and methods Source: Materials and methods Source: Materials and methods Source: Materials and methods Source: Materials and methods Source: Materials and methods

Results: Patient characteristics

A total of 407 pregnant women were included in this study, comprising 243 in the No-GHT group and 164 in the GHT group. Age did not differ significantly between the two groups (P = 0.603). Compared with the No-GHT group, the GHT group had lower levels of Zn, Fe, Ca, P, Mg, vitA, vitD, vitE, vitD3, and ALB, and a higher level of Cu, with unadjusted P < 0.05. In addition, the GHT group had higher levels of ALT, ALP, AST, UA, LDH, GGT, WBC, NEUT, and MCHC, and lower levels of LYMPH and PLT than the No-GHT group, also with unadjusted P < 0.05.

No significant differences were observed between the two groups in TBA, UREA, GLU, CG, CREA, RBC, MCV, or MCH (Table 1).

TABLE 1

Baseline characteristics.

VariablesTotal (N = 407)No-GHT (N = 243)GHT (N = 164)P-value
Age (years)30.00 (27.00, 34.00)30.00 (27.00, 34.00)30.00 (27.00, 34.00)0.603
GW (weeks)10.00 [9.00, 12.00]10.00 [8.00, 12.00]11.00 (9.00, 13.00)< 0.001
Zn (μmol/L)114.52 ± 19.69119.81 ± 18.33106.68 ± 19.06< 0.001
Fe (mmol/L)8.93 ± 1.029.15 ± 0.968.60 ± 1.03< 0.001
Cu (μmol/L)24.46 ± 4.7123.35 ± 4.5026.11 ± 4.53< 0.001
Ca (mmol/L)2.27 ± 0.082.29 ± 0.072.25 ± 0.07< 0.001
P(mmol/L)1.02 ± 0.101.04 ± 0.091.01 ± 0.100.004
Mg (mmol/L)0.84 (0.81, 0.87)0.85 (0.82, 0.87)0.84 (0.80, 0.86)0.003
vitA (ng/mL)0.36 ± 0.060.37 ± 0.060.35 ± 0.05< 0.001
vitD (ng/mL)40.57 ± 6.7341.75 ± 6.5838.83 ± 6.57< 0.001
vitE (ng/mL)6.37 ± 1.056.54 ± 1.036.10 ± 1.03< 0.001
vitD3 (pg/mL)34.15 ± 5.2134.72 ± 5.1033.32 ± 5.290.008
ALB (g/L)40.65 ± 2.9441.32 ± 2.7739.67 ± 2.92< 0.001
ALT (U/L)14.90 (11.00, 18.45)14.00 (10.30, 17.05)16.40 (13.17, 19.83)< 0.001
ALP (U/L)69.50 (56.95, 80.90)64.70 (52.45, 75.60)76.55 (66.18, 89.43)< 0.001
TBA (μmol/L)2.34 (1.86, 2.91)2.34 (1.85, 2.92)2.33 (1.90, 2.89)0.950
UREA (mmol/L)2.88 ± 0.602.86 ± 0.632.91 ± 0.560.429
GLU (mmol/L)4.73 ± 0.564.73 ± 0.584.73 ± 0.520.988
CG (μg/mL)3.48 ± 0.913.47 ± 0.873.50 ± 0.960.689
AST (U/L)18.29 ± 4.0817.86 ± 4.0218.92 ± 4.100.010
CREA (μmol/L)45.28 ± 6.8745.38 ± 6.7345.13 ± 7.090.716
UA (μmol/L)214.89 ± 30.12211.59 ± 29.37219.78 ± 30.630.007
LDH (U/L)148.60 (135.95, 162.95)145.40 (132.40, 159.60)154.05 (143.05, 169.48)< 0.001
GGT (U/L)11.97 ± 3.0911.66 ± 3.1112.43 ± 3.010.014
WBC ( × 109/L)8.66 ± 1.228.45 ± 1.188.98 ± 1.21< 0.001
NEUT ( × 109/L)5.60 ± 1.005.37 ± 0.935.94 ± 1.00< 0.001
LYMPH ( × 109/L)1.91 ± 0.381.95 ± 0.381.85 ± 0.390.010
RBC ( × 1012/L)4.28 ± 0.344.29 ± 0.334.26 ± 0.350.512
PLT ( × 109/L)270.16 ± 33.20274.27 ± 33.33264.07 ± 32.150.002
MCV (fL)87.71 ± 4.8687.64 ± 5.0287.82 ± 4.640.724
MCH (pg)29.94 ± 1.8129.97 ± 1.7929.90 ± 1.850.707
MCHC (g/L)338.00 (331.00, 345.00)337.00 (330.00, 343.00)341.00 (333.00, 347.00)0.003

GW, gestational week; Zn, zinc; Fe, iron; Cu, copper; Ca, calcium; P, phosphorus; Mg, magnesium; vitA, vitamin A; vitD, vitamin D; vitE, vitamin E; vitD3, vitamin D3; ALB, albumin; ALT, alanine aminotransferase; ALP, alkaline phosphatase; TBA, total bile acid; UREA, urea; GLU, glucose; CG, cholyglycine; AST, aspartate aminotransferase; CREA, creatinine; UA, uric acid; LDH, lactate dehydrogenase; GGT, gamma-glutamyl transferase; WBC, white blood cell count; NEUT, neutrophil count; LYMPH, lymphocyte count; RBC, red blood cell count; PLT, platelet count; MCV, mean corpuscular volume; MCH, mean corpuscular hemoglobin; MCHC, mean corpuscular hemoglobin concentration; GHT, gestational hypothyroidism.

Source: Patient characteristics Source: Patient characteristics

Results: Selection of modeling variables

To improve the stability of variable selection and reduce selection bias associated with a single algorithm, this study combined LASSO regression, the Boruta algorithm, and random forest variable importance ranking for feature selection. The optimal penalty parameter λ in LASSO regression was determined by cross-validation. As λ increased, the regression coefficients gradually shrank, and 9 candidate variables were retained (Figures 2A,B). The Boruta algorithm identified variables with stable discriminative contribution by comparing the importance of original variables with that of shadow variables.

Zn, ALP, Fe, and ALB ranked high in importance scores (Figures 2C,D). Random forest analysis ranked candidate variables by importance. To highlight the main discriminative variables, only the top 15 variables were presented. Zn and ALP ranked highest in importance (Figure 2E). The random forest error curve plateaued as the number of decision trees increased (Figure 2F). The intersection of the three feature selection methods yielded 9 core variables, including Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP, which were then used in subsequent model development (Figure 2G).

The correlation heatmap showed no pronounced clustering of high correlations among the selected variables (Figure 2H).

FIGURE 2

Variable selection and correlation analysis. (A) Ten-fold cross-validation curve of LASSO regression for determining the optimal penalty parameter λ. (B) LASSO coefficient path plot showing coefficient shrinkage across different λ values. (C) Variable importance trajectories across classifier runs in the Boruta algorithm. (D) Distribution and ranking of variable importance identified by the Boruta algorithm. (E) Variable importance ranking based on the random forest model. (F) Changes in random forest model error with increasing numbers of trees. (G) Venn diagram of variables selected by LASSO, Boruta, and random forest. (H) Spearman correlation heatmap of the final selected variables. *P < 0.05, **P < 0.01, and ***P < 0.001.

Figure image at the original source — open the original paper. This file is not included in this text import.
Source: Selection of modeling variables Source: Selection of modeling variables

Model development and performance assessment

Results: Model development and performance assessment

Based on the final 9 selected variables, this study developed and compared 12 machine learning models: RandomForest, SVM_Kernel, LogisticModel, NeighborMethod, PLSModel, BoostingMethod, NeuralNet, BayesMethod, DiscriminantModel, Lasso, AdaptiveBoosting, and LightGBM.

In the training set, LightGBM yielded the highest overall performance, with an AUC of 0.971 (95% CI, 0.953–0.988). LightGBM also achieved the highest accuracy (0.906), PPV (0.907), sensitivity (0.852), specificity (0.942), F1 score (0.879), Youden’s J statistic (0.794), and NPV (0.904) (Figures 3A,C,E and Table 2). In the validation set, all models retained discriminatory ability. Lasso had the highest AUC of 0.918 (95% CI, 0.871–0.964), whereas LightGBM had a comparable AUC of 0.916 (95% CI, 0.866–0.965), with an absolute difference of 0.002 (Figures 3B,D).

Although LightGBM did not yield the numerically highest AUC, it achieved the highest accuracy (0.843), PPV (0.857), specificity (0.917), F1 score (0.791), and Youden’s J statistic (0.651) in the validation set. Considering the negligible AUC difference and the more balanced threshold-dependent classification performance, LightGBM was retained for further comprehensive evaluation and interpretation (Figure 3F and Table 3).

FIGURE 3

Discrimination and classification performance of machine learning models in the training and validation sets. (A) ROC curves in the training set. (B) ROC curves in the validation set. (C) Forest plot of AUC values in the training set. (D) Forest plot of AUC values in the validation set. (E) Comparison of classification performance metrics in the training set. (F) Comparison of classification performance metrics in the validation set.

Figure image at the original source — open the original paper. This file is not included in this text import.
TABLE 2

Performance of machine learning models in the training set.

ModelAUC (95% CI)AccuracyPPVSensitivitySpecificityF1 scoreYouden’s JNPV
RandomForest0.859 (0.816–0.903)0.7970.7940.6700.8830.7260.5530.799
SVM_Kernel0.866 (0.823–0.908)0.7900.7430.7300.8300.7370.5610.821
LogisticModel0.868 (0.825–0.910)0.8040.7660.7390.8480.7520.5870.829
NeighborMethod0.736 (0.679–0.793)0.7030.6600.5390.8130.5930.3520.724
PLSModel0.821 (0.772–0.870)0.7730.7550.6430.8600.6950.5030.782
BoostingMethod0.844 (0.798–0.889)0.7730.7450.6610.8480.7000.5090.788
NeuralNet0.804 (0.751–0.858)0.7520.6960.6780.8010.6870.4790.787
BayesMethod0.867 (0.825–0.909)0.7940.7370.7570.8190.7470.5750.833
DiscriminantModel0.870 (0.828–0.912)0.7940.7550.7220.8420.7380.5640.818
Lasso0.872 (0.830–0.913)0.7900.7570.7040.8480.7300.5520.810
AdaptiveBoosting0.871 (0.831–0.911)0.7900.7570.7040.8480.7300.5520.810
LightGBM0.971 (0.953–0.988)0.9060.9070.8520.9420.8790.7940.904

AUC, area under the receiver operating characteristic curve; CI, confidence interval; PPV, positive predictive value; NPV, negative predictive value; SVM, support vector machine; PLS, partial least squares; Lasso, least absolute shrinkage and selection operator; LightGBM, light gradient boosting machine.

TABLE 3

Performance of machine learning models in the validation set.

ModelAUC (95% CI)AccuracyPPVSensitivitySpecificityF1 scoreYouden’s JNPV
RandomForest0.911 (0.861–0.962)0.8180.8290.6940.9030.7560.5970.813
SVM_Kernel0.916 (0.869–0.963)0.8100.7710.7550.8470.7630.6020.836
LogisticModel0.917 (0.870–0.963)0.8260.8330.7140.9030.7690.6170.823
NeighborMethod0.830 (0.758–0.903)0.7270.6740.6330.7920.6530.4240.760
PLSModel0.878 (0.817–0.938)0.7930.7730.6940.8610.7310.5550.805
BoostingMethod0.911 (0.860–0.962)0.8020.7780.7140.8610.7450.5750.816
NeuralNet0.884 (0.825–0.942)0.8100.7710.7550.8470.7630.6020.836
BayesMethod0.912 (0.864–0.960)0.8100.7950.7140.8750.7530.5890.818
DiscriminantModel0.916 (0.869–0.963)0.8180.8140.7140.8890.7610.6030.821
Lasso0.918 (0.871–0.964)0.8180.8290.6940.9030.7560.5970.813
AdaptiveBoosting0.855 (0.789–0.920)0.7440.7050.6330.8190.6670.4520.766
LightGBM0.916 (0.866–0.965)0.8430.8570.7350.9170.7910.6510.835

AUC, area under the receiver operating characteristic curve; CI, confidence interval; PPV, positive predictive value; NPV, negative predictive value; SVM, support vector machine; PLS, partial least squares; Lasso, least absolute shrinkage and selection operator; LightGBM, light gradient boosting machine.

Calibration curves showed overall agreement between predicted probabilities and observed outcomes in the training and internal validation sets (Figures 4A,B). Quantitative calibration metrics are shown in Supplementary Table S2. In the internal validation set, DiscriminantModel, LogisticModel, and SVM_Kernel had relatively low Brier scores of 0.119, 0.119, and 0.120, respectively. For the final LightGBM model, the Brier score, calibration intercept, and calibration slope were 0.077, 0.022, and 2.198 in the training set, and 0.131, 0.096, and 1.040 in the internal validation set, respectively.

These results indicated acceptable calibration performance of LightGBM in the internal validation set. DCA yielded positive net benefit for most models within specific threshold probability ranges (Figures 4C,D). Clinical impact curves indicated that the predicted number of high-risk cases decreased as the risk threshold increased, with a trend generally consistent with the number of observed events (Figures 4E,F). The LightGBM confusion matrices further supported its classification performance on both the training and validation sets (Figures 4G,H).

FIGURE 4

Calibration, clinical utility, and confusion matrices of the LightGBM model. (A) Calibration curves in the training set. (B) Calibration curves in the validation set. (C) Decision curve analysis in the training set. (D) Decision curve analysis in the validation set. (E) Clinical impact curves in the training set. (F) Clinical impact curves in the validation set. (G) Confusion matrix of the LightGBM model in the training set. (H) Confusion matrix of the LightGBM model in the validation set.

Figure image at the original source — open the original paper. This file is not included in this text import.

Residual analysis was performed to assess the distribution of prediction errors. Reverse cumulative absolute residual curves and residual box plots demonstrated differences in residual distributions across models. LightGBM exhibited relatively low and stable residual levels in both the training and validation sets, with no marked clustering of large residuals (Figures 5A–D). Based on its comparable discrimination, balanced classification performance, acceptable calibration in the internal validation set, clinical net benefit, residual distribution, and compatibility with SHAP-based interpretation, LightGBM was selected as the final model for subsequent interpretation analysis.

FIGURE 5

Residual distribution analysis of machine learning models. (A) Reverse cumulative absolute residual distribution in the training set. (B) Reverse cumulative absolute residual distribution in the validation set (C). Boxplot of absolute residuals in the training set. (D) Boxplot of absolute residuals in the validation set.

Figure image at the original source — open the original paper. This file is not included in this text import.

In the GW-adjusted sensitivity analysis, the LightGBM model achieved an AUC of 0.977 in the training set and 0.915 in the internal validation set, which was comparable to the primary model. In the gain-based feature-importance ranking, ALP remained the leading predictor, whereas GW showed the lowest contribution among the included variables (Supplementary Table S3). These findings suggest that the predictive contribution of ALP was not fully explained by gestational week.

Source: Model development and performance assessment Source: Model development and performance assessment Source: Model development and performance assessment Source: Model development and performance assessment Source: Model development and performance assessment Source: Model development and performance assessment Source: Model development and performance assessment Source: Model development and performance assessment Source: Model development and performance assessment Source: Model development and performance assessment

Results: SHAP-based model interpretation

To further interpret the predictions generated by LightGBM, this study used SHAP to quantify each variable’s contribution to the model’s output. Ranking by mean absolute SHAP value identified Zn as the largest contributor to model prediction, followed by ALP, ALB, Cu, vitE, ALT, Fe, Ca, and vitD (Figure 6A). The SHAP summary plot demonstrated heterogeneous directions of feature effects. Lower levels of Zn, ALB, Fe, Ca, vitD, and vitE generally shifted model output toward higher GHT risk. In contrast, higher levels of ALP, Cu, and ALT were generally associated with higher predicted risk (Figure 6B).

FIGURE 6

SHAP-based interpretation of the LightGBM model. (A) Variable importance ranking based on mean absolute SHAP values; (B) SHAP summary plot showing the distribution of feature values and their direction of contribution to model output; (C) SHAP waterfall plot for sample 1; (D) SHAP waterfall plot for sample 2; (E) SHAP force plot for sample 1, corresponding to the same individual shown in (C); (F) SHAP force plot for sample 2, corresponding to the same individual shown in (D).

Figure image at the original source — open the original paper. This file is not included in this text import.

0

Individual-level SHAP interpretation demonstrated that model predictions were jointly determined by multiple variables rather than dominated by a single indicator. For sample 1, Zn made a positive contribution to the prediction, whereas Cu, ALB, ALP, and ALT mainly made negative contributions, resulting in a final model output of f(x) = -0.0378 (Figure 6C). The corresponding SHAP force plot displayed the cumulative direction and magnitude of each variable contribution for this sample (Figure 6E). For sample 2, Cu, ALT, vitD, and Zn mainly shifted the prediction in the negative direction.

In contrast, Ca made a relatively strong positive contribution to model output, resulting in a final model output of f(x) = -0.167 (Figure 6D). The SHAP force plot for this sample was consistent with the waterfall plot and indicated that the prediction was also determined by the combined effects of multiple variables (Figure 6F).

SHAP dependence plots further identified nonlinear relationships between individual variables and model output. Zn, Fe, Ca, vitD, vitE, and ALB showed overall negative trends, with higher levels generally associated with lower SHAP values. In contrast, Cu, ALT, and ALP exhibited overall positive trends, with higher levels generally corresponding to higher SHAP values (Figure 7). These findings indicated that multivariable effects, nonlinearity, and directional heterogeneity characterized the GHT-related risk pattern captured by LightGBM.

FIGURE 7

SHAP dependence plots of variables in the LightGBM model. The plots show the relationships between Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP and their corresponding SHAP values. The x-axis represents the feature value, the y-axis represents the SHAP value, and the color scale indicates the interacting feature’s value, illustrating potential nonlinear associations between predictors and the model output.

Figure image at the original source — open the original paper. This file is not included in this text import.
Source: SHAP-based model interpretation Source: SHAP-based model interpretation Source: SHAP-based model interpretation Source: SHAP-based model interpretation Source: SHAP-based model interpretation Source: SHAP-based model interpretation

Model deployment and visualization applications

Results: Model deployment and visualization applications

To improve the accessibility and usability of LightGBM, this study deployed the model as a Shiny-based online risk prediction system. The system incorporated the 9 final model features, including Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP. After entering the corresponding values, users can obtain the predicted probability of individual GHT risk and the corresponding risk stratification result in real time (Figure 8). The system also provides an individualized SHAP-based interpretation interface. This interface displays the direction and magnitude of each feature’s contribution to the current prediction, thereby presenting model output and interpretability results within the same workflow.

The online tool has been released on ShinyApps.io at https://predicttheoutcome123.shinyapps.io/shiny_lgb_project/. Overall, this deployment provides a direct interface for individualized risk assessment and interpretability visualization based on LightGBM.

FIGURE 8

Web-based risk prediction calculator for GHT based on the LightGBM model. The Shiny-based calculator incorporates the nine variables in the final model: Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP. After entering the corresponding clinical indicators, the system provides the individualized predicted probability of GHT and the corresponding risk classification in real time. A SHAP-based explanation plot is also provided to visualize the direction and magnitude of each variable’s contribution to the individual prediction.

Figure image at the original source — open the original paper. This file is not included in this text import.
Source: Model deployment and visualization applications Source: Model deployment and visualization applications

Discussion

This study developed and validated machine learning models for predicting the risk of incident GHT. By integrating LASSO regression, the Boruta algorithm, and random forest variable importance ranking, 9 core variables were identified: Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP. Among 12 models, LightGBM showed the best overall performance in the training set. In the internal validation set, Lasso had a slightly higher AUC than LightGBM; however, the absolute difference was only 0.002. LightGBM showed more balanced performance in accuracy, PPV, specificity, F1 score, and Youden’s J statistic, and it also demonstrated acceptable calibration in the internal validation set, clinical net benefit, and stable residual distribution.

Therefore, LightGBM was selected as the final model based on overall performance rather than AUC alone. SHAP analysis further identified Zn as the largest contributor to model output, followed by ALP, ALB, Cu, vitE, ALT, Fe, Ca, and vitD. These findings suggest that incident GHT risk was captured by a multidimensional laboratory profile rather than by a single thyroid function marker. The profile involved trace element homeostasis, vitamin status, protein nutritional reserve, and liver-related metabolic markers.

Mineral-related variables occupied a central position in the final model. Gu et al evaluated the individual and combined effects of iodine, selenium, zinc, calcium, magnesium, and iron on thyroid hormones in 489 Chinese pregnant women and reported that Ca was positively associated with FT3, whereas Zn was positively associated with FT4. These findings indicate an association between mineral status and the thyroid hormone profile during pregnancy (23). A machine learning study using National Health and Nutrition Examination Survey (NHANES) data from 7,779 participants further identified nonlinear relationships between multiple mineral intakes and thyroid dysfunction.

Ca, Zn, Mg, and related indicators were associated with a lower risk of thyroid dysfunction (24). The case-control study by Vargas-Uricoechea et al also reported that zinc deficiency was associated with higher frequencies of functional thyroid disease and thyroid autoimmunity (25). These findings are consistent with the direction observed in this study, in which lower levels of Zn, Fe, and Ca were associated with a higher predicted risk of GHT. At the mechanistic level, Zn and Fe are important regulators of thyroid peroxidase (TPO) activity.

TPO is a key enzyme in thyroid hormone synthesis, catalyzing iodine oxidation and tyrosine iodination. Deficiency of Zn and Fe may affect TPO catalytic activity and reduce the efficiency of thyroid hormone synthesis (12, 26). Abnormal serum Ca may also contribute to the occurrence and development of GHT by affecting intracellular Ca2+ signaling in thyroid cells, particularly through iodine organification and thyroid hormone release mediated by the TSH downstream Gq/G11–PLC–Ca2+ pathway (27).

The inclusion of vitamin markers and metal elements further indicates that GHT risk is associated with nutritional status and oxidative stress. Zheng et al reported that vitamin D deficiency in early pregnancy was associated with increased risk of GHT, with an adjusted odds ratio (OR) of 1.32 (95% CI, 1.01–1.74) (28). Liu et al used NHANES data and reported that higher vitamin E intake was associated with lower prevalence of subclinical hypothyroidism and autoimmune thyroiditis. However, this association was mainly observed in men (29).

These findings are generally consistent with the direction identified in this study, in which lower levels of vitD and vitE were associated with a higher predicted risk of GHT. However, they also indicate that the role of vitamin markers may vary across populations, measurement methods, and gestational stages. In addition, higher Cu levels in this study shifted model output toward higher GHT risk. Zhou et al reported that prenatal exposure to metal mixtures was associated with altered neonatal thyroid function in 2,444 mother-infant pairs (30).

At the mechanistic level, Cu is a key cofactor for several antioxidant enzymes, including ceruloplasmin (CP) and superoxide dismutase (SOD). These enzymes participate in the clearance of reactive oxygen species (ROS) in thyroid cells. Disrupted Cu homeostasis may affect antioxidant enzyme activity, alter oxidative stress in thyroid cells, and affect thyroid hormone synthesis and secretion (31, 32).

ALB, ALT, and ALP were retained simultaneously in the final model. Previous research has reported associations of GHT with liver function markers and neonatal birth weight, suggesting potential interactions among thyroid dysfunction, hepatic metabolic status, and pregnancy outcomes (33). Mechanistically, the liver participates in the synthesis of binding proteins, including albumin, thyroxine-binding globulin, and transthyretin, and contributes to peripheral conversion of T4 to T3. Thyroid hormones also regulate hepatic glucose and lipid metabolism, bile acid metabolism, and mitochondrial function (34).

Therefore, the associations of ALB, ALT, and ALP with GHT risk in this study may reflect combined changes in protein nutritional reserve, hepatic metabolic adaptation, pregnancy-related physiological changes, and the thyroid axis. Because ALP may vary physiologically during pregnancy, its contribution should be interpreted with consideration of gestational timing. In the GW-adjusted sensitivity analysis, ALP remained the leading feature, whereas GW showed the lowest contribution, suggesting that the predictive role of ALP was not fully attributable to gestational week. These findings should not be directly interpreted as specific signals of liver disease.

Methodologically, this study compared 12 models under the same feature input, data partition, and preprocessing framework. Recent advances in machine learning and deep learning have supported computer-aided diagnosis and risk prediction across different medical fields, including image-based disease detection and endocrine disorder assessment. Yadav et al. developed an automatic computer-aided diagnosis tool for glaucoma detection using U-Net and CNN on retinal fundus images (35). Dhanka et al. reviewed advances in machine learning and deep learning for hormonal disorder diagnosis, including PCOS, thyroid disorders, and optimization techniques (36).

Recent studies have also increasingly applied machine learning to pregnancy-related risk stratification. For example, Xing et al. developed GDMPredictor, a machine-learning tool for gestational diabetes mellitus risk assessment and treatment recommendation based on clinical and biochemical records (37). Compared with such broader gestational disease prediction tools, the present study focused on incident GHT and adopted a relatively parsimonious laboratory-marker model combined with SHAP-based interpretation to support risk stratification and individualized monitoring. Model performance was evaluated using discrimination, classification metrics, calibration, clinical net benefit, and residual distribution.

The TRIPOD+AI statement emphasizes that clinical prediction models developed using regression or machine-learning methods should transparently report data sources, predictors, missing-data handling, model development, validation, and performance evaluation (38). PROBAST+AI further emphasizes assessment of risk of bias, applicability, and conditions for external generalization in prediction model studies (39). In obstetrics, LightGBM combined with SHAP has been used to predict sleep disorders during pregnancy and provided feature-level explanations (40). Studies predicting adverse outcomes in gestational diabetes mellitus also indicate that machine learning models may perform well in development datasets, but performance may decrease during external validation (41).

Khan et al used interpretable machine learning to predict preterm birth in 3,509 pregnant women and emphasized that SHAP can support interpretation of individual predictions but cannot replace external validation (42). Therefore, the selection of LightGBM and the use of SHAP interpretation in this study are methodologically appropriate, whereas clinical implementation still requires further validation.

This study provides an interpretable auxiliary tool for GHT risk stratification at the first prenatal assessment. The model is not intended to replace TSH and FT4 testing or clinical diagnosis. It uses clinical laboratory markers to identify pregnant women at increased risk of subsequent GHT, thereby providing a reference for thyroid function retesting, nutritional assessment, and individualized follow-up. Similarly, Wang et al. showed, using an interpretable machine learning model for perinatal depression, that external validation and an interpretability framework may improve the usability of models in clinical risk screening (43).

Studies on explainable artificial intelligence in medicine have also noted that methods such as SHAP can improve model transparency. However, SHAP results remain model-level associative contributions and cannot be directly interpreted as causal mechanisms (44). Therefore, the SHAP contributions of Zn, ALP, ALB, Cu, and other variables in this study should be interpreted as risk signals identified by the model rather than direct causal evidence for GHT.

This study has several limitations. First, this was a single-center retrospective study for prediction model development and internal validation; therefore, the generalizability of the model to other hospitals and populations remains uncertain. The observed event fraction reflected the outcome distribution of the analytic dataset and should not be interpreted as the population incidence of incident GHT. Second, outcome status was determined from available post-baseline thyroid function records and prenatal follow-up information. Because thyroid function retesting schedules and follow-up intensity were not fully standardized, outcome ascertainment bias may exist.

Third, locally established pregnancy-specific or trimester-specific thyroid function reference intervals were unavailable, which may have introduced potential outcome misclassification. Fourth, although multiple imputation was used to handle missing data, residual bias related to the missing-data mechanism cannot be fully excluded. Fifth, some predictors, particularly trace elements and vitamin-related markers, may not be routinely measured in all prenatal care settings, which may limit direct model implementation in settings with different testing workflows. Finally, SHAP-based interpretation reflects model-derived associations rather than causal relationships.

External prospective validation and, if necessary, local recalibration are required before clinical implementation.

Source: Discussion Source: Discussion Source: Discussion Source: Discussion Source: Discussion Source: Discussion Source: Discussion

Results

Patient characteristics

A total of 407 pregnant women were included in this study, comprising 243 in the No-GHT group and 164 in the GHT group. Age did not differ significantly between the two groups (P = 0.603). Compared with the No-GHT group, the GHT group had lower levels of Zn, Fe, Ca, P, Mg, vitA, vitD, vitE, vitD3, and ALB, and a higher level of Cu, with unadjusted P < 0.05. In addition, the GHT group had higher levels of ALT, ALP, AST, UA, LDH, GGT, WBC, NEUT, and MCHC, and lower levels of LYMPH and PLT than the No-GHT group, also with unadjusted P < 0.05.

No significant differences were observed between the two groups in TBA, UREA, GLU, CG, CREA, RBC, MCV, or MCH (Table 1).

Selection of modeling variables

To improve the stability of variable selection and reduce selection bias associated with a single algorithm, this study combined LASSO regression, the Boruta algorithm, and random forest variable importance ranking for feature selection. The optimal penalty parameter λ in LASSO regression was determined by cross-validation. As λ increased, the regression coefficients gradually shrank, and 9 candidate variables were retained (Figures 2A,B). The Boruta algorithm identified variables with stable discriminative contribution by comparing the importance of original variables with that of shadow variables.

Zn, ALP, Fe, and ALB ranked high in importance scores (Figures 2C,D). Random forest analysis ranked candidate variables by importance. To highlight the main discriminative variables, only the top 15 variables were presented. Zn and ALP ranked highest in importance (Figure 2E). The random forest error curve plateaued as the number of decision trees increased (Figure 2F). The intersection of the three feature selection methods yielded 9 core variables, including Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP, which were then used in subsequent model development (Figure 2G).

The correlation heatmap showed no pronounced clustering of high correlations among the selected variables (Figure 2H).

FIGURE 2

Variable selection and correlation analysis. (A) Ten-fold cross-validation curve of LASSO regression for determining the optimal penalty parameter λ. (B) LASSO coefficient path plot showing coefficient shrinkage across different λ values. (C) Variable importance trajectories across classifier runs in the Boruta algorithm. (D) Distribution and ranking of variable importance identified by the Boruta algorithm. (E) Variable importance ranking based on the random forest model. (F) Changes in random forest model error with increasing numbers of trees. (G) Venn diagram of variables selected by LASSO, Boruta, and random forest. (H) Spearman correlation heatmap of the final selected variables. *P < 0.05, **P < 0.01, and ***P < 0.001.

Figure image at the original source — open the original paper. This file is not included in this text import.

Model development and performance assessment

Based on the final 9 selected variables, this study developed and compared 12 machine learning models: RandomForest, SVM_Kernel, LogisticModel, NeighborMethod, PLSModel, BoostingMethod, NeuralNet, BayesMethod, DiscriminantModel, Lasso, AdaptiveBoosting, and LightGBM.

In the training set, LightGBM yielded the highest overall performance, with an AUC of 0.971 (95% CI, 0.953–0.988). LightGBM also achieved the highest accuracy (0.906), PPV (0.907), sensitivity (0.852), specificity (0.942), F1 score (0.879), Youden’s J statistic (0.794), and NPV (0.904) (Figures 3A,C,E and Table 2). In the validation set, all models retained discriminatory ability. Lasso had the highest AUC of 0.918 (95% CI, 0.871–0.964), whereas LightGBM had a comparable AUC of 0.916 (95% CI, 0.866–0.965), with an absolute difference of 0.002 (Figures 3B,D).

Although LightGBM did not yield the numerically highest AUC, it achieved the highest accuracy (0.843), PPV (0.857), specificity (0.917), F1 score (0.791), and Youden’s J statistic (0.651) in the validation set. Considering the negligible AUC difference and the more balanced threshold-dependent classification performance, LightGBM was retained for further comprehensive evaluation and interpretation (Figure 3F and Table 3).

FIGURE 3

Discrimination and classification performance of machine learning models in the training and validation sets. (A) ROC curves in the training set. (B) ROC curves in the validation set. (C) Forest plot of AUC values in the training set. (D) Forest plot of AUC values in the validation set. (E) Comparison of classification performance metrics in the training set. (F) Comparison of classification performance metrics in the validation set.

Figure image at the original source — open the original paper. This file is not included in this text import.
TABLE 2

Performance of machine learning models in the training set.

ModelAUC (95% CI)AccuracyPPVSensitivitySpecificityF1 scoreYouden’s JNPV
RandomForest0.859 (0.816–0.903)0.7970.7940.6700.8830.7260.5530.799
SVM_Kernel0.866 (0.823–0.908)0.7900.7430.7300.8300.7370.5610.821
LogisticModel0.868 (0.825–0.910)0.8040.7660.7390.8480.7520.5870.829
NeighborMethod0.736 (0.679–0.793)0.7030.6600.5390.8130.5930.3520.724
PLSModel0.821 (0.772–0.870)0.7730.7550.6430.8600.6950.5030.782
BoostingMethod0.844 (0.798–0.889)0.7730.7450.6610.8480.7000.5090.788
NeuralNet0.804 (0.751–0.858)0.7520.6960.6780.8010.6870.4790.787
BayesMethod0.867 (0.825–0.909)0.7940.7370.7570.8190.7470.5750.833
DiscriminantModel0.870 (0.828–0.912)0.7940.7550.7220.8420.7380.5640.818
Lasso0.872 (0.830–0.913)0.7900.7570.7040.8480.7300.5520.810
AdaptiveBoosting0.871 (0.831–0.911)0.7900.7570.7040.8480.7300.5520.810
LightGBM0.971 (0.953–0.988)0.9060.9070.8520.9420.8790.7940.904

AUC, area under the receiver operating characteristic curve; CI, confidence interval; PPV, positive predictive value; NPV, negative predictive value; SVM, support vector machine; PLS, partial least squares; Lasso, least absolute shrinkage and selection operator; LightGBM, light gradient boosting machine.

TABLE 3

Performance of machine learning models in the validation set.

ModelAUC (95% CI)AccuracyPPVSensitivitySpecificityF1 scoreYouden’s JNPV
RandomForest0.911 (0.861–0.962)0.8180.8290.6940.9030.7560.5970.813
SVM_Kernel0.916 (0.869–0.963)0.8100.7710.7550.8470.7630.6020.836
LogisticModel0.917 (0.870–0.963)0.8260.8330.7140.9030.7690.6170.823
NeighborMethod0.830 (0.758–0.903)0.7270.6740.6330.7920.6530.4240.760
PLSModel0.878 (0.817–0.938)0.7930.7730.6940.8610.7310.5550.805
BoostingMethod0.911 (0.860–0.962)0.8020.7780.7140.8610.7450.5750.816
NeuralNet0.884 (0.825–0.942)0.8100.7710.7550.8470.7630.6020.836
BayesMethod0.912 (0.864–0.960)0.8100.7950.7140.8750.7530.5890.818
DiscriminantModel0.916 (0.869–0.963)0.8180.8140.7140.8890.7610.6030.821
Lasso0.918 (0.871–0.964)0.8180.8290.6940.9030.7560.5970.813
AdaptiveBoosting0.855 (0.789–0.920)0.7440.7050.6330.8190.6670.4520.766
LightGBM0.916 (0.866–0.965)0.8430.8570.7350.9170.7910.6510.835

AUC, area under the receiver operating characteristic curve; CI, confidence interval; PPV, positive predictive value; NPV, negative predictive value; SVM, support vector machine; PLS, partial least squares; Lasso, least absolute shrinkage and selection operator; LightGBM, light gradient boosting machine.

Calibration curves showed overall agreement between predicted probabilities and observed outcomes in the training and internal validation sets (Figures 4A,B). Quantitative calibration metrics are shown in Supplementary Table S2. In the internal validation set, DiscriminantModel, LogisticModel, and SVM_Kernel had relatively low Brier scores of 0.119, 0.119, and 0.120, respectively. For the final LightGBM model, the Brier score, calibration intercept, and calibration slope were 0.077, 0.022, and 2.198 in the training set, and 0.131, 0.096, and 1.040 in the internal validation set, respectively.

These results indicated acceptable calibration performance of LightGBM in the internal validation set. DCA yielded positive net benefit for most models within specific threshold probability ranges (Figures 4C,D). Clinical impact curves indicated that the predicted number of high-risk cases decreased as the risk threshold increased, with a trend generally consistent with the number of observed events (Figures 4E,F). The LightGBM confusion matrices further supported its classification performance on both the training and validation sets (Figures 4G,H).

FIGURE 4

Calibration, clinical utility, and confusion matrices of the LightGBM model. (A) Calibration curves in the training set. (B) Calibration curves in the validation set. (C) Decision curve analysis in the training set. (D) Decision curve analysis in the validation set. (E) Clinical impact curves in the training set. (F) Clinical impact curves in the validation set. (G) Confusion matrix of the LightGBM model in the training set. (H) Confusion matrix of the LightGBM model in the validation set.

Figure image at the original source — open the original paper. This file is not included in this text import.

Residual analysis was performed to assess the distribution of prediction errors. Reverse cumulative absolute residual curves and residual box plots demonstrated differences in residual distributions across models. LightGBM exhibited relatively low and stable residual levels in both the training and validation sets, with no marked clustering of large residuals (Figures 5A–D). Based on its comparable discrimination, balanced classification performance, acceptable calibration in the internal validation set, clinical net benefit, residual distribution, and compatibility with SHAP-based interpretation, LightGBM was selected as the final model for subsequent interpretation analysis.

FIGURE 5

Residual distribution analysis of machine learning models. (A) Reverse cumulative absolute residual distribution in the training set. (B) Reverse cumulative absolute residual distribution in the validation set (C). Boxplot of absolute residuals in the training set. (D) Boxplot of absolute residuals in the validation set.

Figure image at the original source — open the original paper. This file is not included in this text import.

In the GW-adjusted sensitivity analysis, the LightGBM model achieved an AUC of 0.977 in the training set and 0.915 in the internal validation set, which was comparable to the primary model. In the gain-based feature-importance ranking, ALP remained the leading predictor, whereas GW showed the lowest contribution among the included variables (Supplementary Table S3). These findings suggest that the predictive contribution of ALP was not fully explained by gestational week.

SHAP-based model interpretation

To further interpret the predictions generated by LightGBM, this study used SHAP to quantify each variable’s contribution to the model’s output. Ranking by mean absolute SHAP value identified Zn as the largest contributor to model prediction, followed by ALP, ALB, Cu, vitE, ALT, Fe, Ca, and vitD (Figure 6A). The SHAP summary plot demonstrated heterogeneous directions of feature effects. Lower levels of Zn, ALB, Fe, Ca, vitD, and vitE generally shifted model output toward higher GHT risk. In contrast, higher levels of ALP, Cu, and ALT were generally associated with higher predicted risk (Figure 6B).

FIGURE 6

SHAP-based interpretation of the LightGBM model. (A) Variable importance ranking based on mean absolute SHAP values; (B) SHAP summary plot showing the distribution of feature values and their direction of contribution to model output; (C) SHAP waterfall plot for sample 1; (D) SHAP waterfall plot for sample 2; (E) SHAP force plot for sample 1, corresponding to the same individual shown in (C); (F) SHAP force plot for sample 2, corresponding to the same individual shown in (D).

Figure image at the original source — open the original paper. This file is not included in this text import.

0

Individual-level SHAP interpretation demonstrated that model predictions were jointly determined by multiple variables rather than dominated by a single indicator. For sample 1, Zn made a positive contribution to the prediction, whereas Cu, ALB, ALP, and ALT mainly made negative contributions, resulting in a final model output of f(x) = -0.0378 (Figure 6C). The corresponding SHAP force plot displayed the cumulative direction and magnitude of each variable contribution for this sample (Figure 6E). For sample 2, Cu, ALT, vitD, and Zn mainly shifted the prediction in the negative direction.

In contrast, Ca made a relatively strong positive contribution to model output, resulting in a final model output of f(x) = -0.167 (Figure 6D). The SHAP force plot for this sample was consistent with the waterfall plot and indicated that the prediction was also determined by the combined effects of multiple variables (Figure 6F).

SHAP dependence plots further identified nonlinear relationships between individual variables and model output. Zn, Fe, Ca, vitD, vitE, and ALB showed overall negative trends, with higher levels generally associated with lower SHAP values. In contrast, Cu, ALT, and ALP exhibited overall positive trends, with higher levels generally corresponding to higher SHAP values (Figure 7). These findings indicated that multivariable effects, nonlinearity, and directional heterogeneity characterized the GHT-related risk pattern captured by LightGBM.

FIGURE 7

SHAP dependence plots of variables in the LightGBM model. The plots show the relationships between Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP and their corresponding SHAP values. The x-axis represents the feature value, the y-axis represents the SHAP value, and the color scale indicates the interacting feature’s value, illustrating potential nonlinear associations between predictors and the model output.

Figure image at the original source — open the original paper. This file is not included in this text import.

Model deployment and visualization applications

To improve the accessibility and usability of LightGBM, this study deployed the model as a Shiny-based online risk prediction system. The system incorporated the 9 final model features, including Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP. After entering the corresponding values, users can obtain the predicted probability of individual GHT risk and the corresponding risk stratification result in real time (Figure 8). The system also provides an individualized SHAP-based interpretation interface. This interface displays the direction and magnitude of each feature’s contribution to the current prediction, thereby presenting model output and interpretability results within the same workflow.

The online tool has been released on ShinyApps.io at https://predicttheoutcome123.shinyapps.io/shiny_lgb_project/. Overall, this deployment provides a direct interface for individualized risk assessment and interpretability visualization based on LightGBM.

FIGURE 8

Web-based risk prediction calculator for GHT based on the LightGBM model. The Shiny-based calculator incorporates the nine variables in the final model: Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP. After entering the corresponding clinical indicators, the system provides the individualized predicted probability of GHT and the corresponding risk classification in real time. A SHAP-based explanation plot is also provided to visualize the direction and magnitude of each variable’s contribution to the individual prediction.

Figure image at the original source — open the original paper. This file is not included in this text import.
TABLE 1

Baseline characteristics.

VariablesTotal (N = 407)No-GHT (N = 243)GHT (N = 164)P-value
Age (years)30.00 (27.00, 34.00)30.00 (27.00, 34.00)30.00 (27.00, 34.00)0.603
GW (weeks)10.00 [9.00, 12.00]10.00 [8.00, 12.00]11.00 (9.00, 13.00)< 0.001
Zn (μmol/L)114.52 ± 19.69119.81 ± 18.33106.68 ± 19.06< 0.001
Fe (mmol/L)8.93 ± 1.029.15 ± 0.968.60 ± 1.03< 0.001
Cu (μmol/L)24.46 ± 4.7123.35 ± 4.5026.11 ± 4.53< 0.001
Ca (mmol/L)2.27 ± 0.082.29 ± 0.072.25 ± 0.07< 0.001
P(mmol/L)1.02 ± 0.101.04 ± 0.091.01 ± 0.100.004
Mg (mmol/L)0.84 (0.81, 0.87)0.85 (0.82, 0.87)0.84 (0.80, 0.86)0.003
vitA (ng/mL)0.36 ± 0.060.37 ± 0.060.35 ± 0.05< 0.001
vitD (ng/mL)40.57 ± 6.7341.75 ± 6.5838.83 ± 6.57< 0.001
vitE (ng/mL)6.37 ± 1.056.54 ± 1.036.10 ± 1.03< 0.001
vitD3 (pg/mL)34.15 ± 5.2134.72 ± 5.1033.32 ± 5.290.008
ALB (g/L)40.65 ± 2.9441.32 ± 2.7739.67 ± 2.92< 0.001
ALT (U/L)14.90 (11.00, 18.45)14.00 (10.30, 17.05)16.40 (13.17, 19.83)< 0.001
ALP (U/L)69.50 (56.95, 80.90)64.70 (52.45, 75.60)76.55 (66.18, 89.43)< 0.001
TBA (μmol/L)2.34 (1.86, 2.91)2.34 (1.85, 2.92)2.33 (1.90, 2.89)0.950
UREA (mmol/L)2.88 ± 0.602.86 ± 0.632.91 ± 0.560.429
GLU (mmol/L)4.73 ± 0.564.73 ± 0.584.73 ± 0.520.988
CG (μg/mL)3.48 ± 0.913.47 ± 0.873.50 ± 0.960.689
AST (U/L)18.29 ± 4.0817.86 ± 4.0218.92 ± 4.100.010
CREA (μmol/L)45.28 ± 6.8745.38 ± 6.7345.13 ± 7.090.716
UA (μmol/L)214.89 ± 30.12211.59 ± 29.37219.78 ± 30.630.007
LDH (U/L)148.60 (135.95, 162.95)145.40 (132.40, 159.60)154.05 (143.05, 169.48)< 0.001
GGT (U/L)11.97 ± 3.0911.66 ± 3.1112.43 ± 3.010.014
WBC ( × 109/L)8.66 ± 1.228.45 ± 1.188.98 ± 1.21< 0.001
NEUT ( × 109/L)5.60 ± 1.005.37 ± 0.935.94 ± 1.00< 0.001
LYMPH ( × 109/L)1.91 ± 0.381.95 ± 0.381.85 ± 0.390.010
RBC ( × 1012/L)4.28 ± 0.344.29 ± 0.334.26 ± 0.350.512
PLT ( × 109/L)270.16 ± 33.20274.27 ± 33.33264.07 ± 32.150.002
MCV (fL)87.71 ± 4.8687.64 ± 5.0287.82 ± 4.640.724
MCH (pg)29.94 ± 1.8129.97 ± 1.7929.90 ± 1.850.707
MCHC (g/L)338.00 (331.00, 345.00)337.00 (330.00, 343.00)341.00 (333.00, 347.00)0.003

GW, gestational week; Zn, zinc; Fe, iron; Cu, copper; Ca, calcium; P, phosphorus; Mg, magnesium; vitA, vitamin A; vitD, vitamin D; vitE, vitamin E; vitD3, vitamin D3; ALB, albumin; ALT, alanine aminotransferase; ALP, alkaline phosphatase; TBA, total bile acid; UREA, urea; GLU, glucose; CG, cholyglycine; AST, aspartate aminotransferase; CREA, creatinine; UA, uric acid; LDH, lactate dehydrogenase; GGT, gamma-glutamyl transferase; WBC, white blood cell count; NEUT, neutrophil count; LYMPH, lymphocyte count; RBC, red blood cell count; PLT, platelet count; MCV, mean corpuscular volume; MCH, mean corpuscular hemoglobin; MCHC, mean corpuscular hemoglobin concentration; GHT, gestational hypothyroidism.

Source: Results Source: Results Source: Results Source: Results Source: Results Source: Results

Conclusion

A LightGBM model using clinical laboratory markers showed balanced performance for predicting incident GHT. SHAP analysis identified Zn, ALP, ALB, Cu, vitE, ALT, Fe, Ca, and vitD as the leading contributors to model output. These results suggest that a multidimensional laboratory profile can characterize the risk of incident GHT. External prospective validation is needed before clinical implementation.

Source: Conclusion
Authors’ abstract

Objective

Traditional risk factors have limited performance for early identification of gestational hypothyroidism (GHT), and evidence remains limited on prediction using clinical laboratory markers.

Methods

This single-center retrospective observational study included 407 pregnant women without GHT at baseline, including 164 with incident GHT and 243 without GHT during follow-up. Candidate predictors were extracted from electronic medical records and laboratory information systems. Least Absolute Shrinkage and Selection Operator (LASSO) regression, the Boruta algorithm, and Random Forest variable-importance ranking were used for feature selection. Twelve ML models were developed and compared. Model performance was evaluated using the area under the receiver operating characteristic curve (AUC), classification metrics, calibration curves, decision curve analysis (DCA), clinical impact curves, and residual analysis.

Shapley Additive Explanations (SHAP) was used for interpretation.

Results

Nine predictors were retained: zinc (Zn), iron (Fe), copper (Cu), calcium (Ca), vitamin D (vitD), vitamin E (vitE), albumin (ALB), alanine aminotransferase (ALT), and alkaline phosphatase (ALP). In the validation set, Lasso had the highest AUC [0.918; 95% confidence interval (CI), 0.871–0.964]. Light Gradient Boosting Machine (LightGBM) had a similar AUC (0.916; 95% CI, 0.866–0.965) and achieved the highest accuracy, positive predictive value (PPV), specificity, F1 score, and Youden’s J statistic. LightGBM also showed acceptable calibration performance in the internal validation set, clinical net benefit, and residual distribution; therefore, it was selected as the final model.

SHAP identified Zn, ALP, ALB, Cu, vitE, ALT, Fe, Ca, and vitD as the leading contributors.

Conclusion

A LightGBM model based on clinical laboratory markers showed balanced performance for predicting incident GHT. External prospective validation is required before clinical implementation.

Read the full paper

Introduction

Gestational hypothyroidism (GHT) is a common endocrine disorder during pregnancy and includes overt hypothyroidism and subclinical hypothyroidism (1). Recent studies have reported a disease burden of thyroid dysfunction during pregnancy across regions; however, prevalence estimates vary by region, iodine status, timing of testing, and diagnostic criteria (2). Thyroid dysfunction during pregnancy is not only a laboratory abnormality. It is also associated with maternal and fetal outcomes. A prospective cohort study reported an association between maternal thyroid dysfunction and increased risk of adverse pregnancy outcomes (3).

Studies using large population databases also reported higher risks of pregnancy, delivery, and neonatal complications among pregnant women with hypothyroidism (4). Therefore, early identification and risk stratification of GHT remain clinical issues in prenatal care.

The diagnosis of GHT currently relies mainly on thyroid function markers, including thyroid-stimulating hormone (TSH) and free thyroxine (FT4). However, traditional high-risk factors have limited performance in early screening and risk stratification. An individual participant data meta-analysis of 25 cohorts and 65,559 pregnant women reported that selective screening based on currently recommended risk factors covered 58% of the population and detected only 59% of overt and subclinical hypothyroidism cases. A prediction model based on age, body mass index (BMI), smoking status, parity, and gestational week at the time of blood sampling yielded an area under the curve (AUC) of 0.58–0.63 (5).

Another systematic review included 81 studies and assessed 36 candidate risk factors. The review found substantial heterogeneity in the evidence for most recommended risk factors and did not identify new clinical risk factors that consistently improved screening performance (6). Furthermore, the benefit of treating subclinical hypothyroidism during pregnancy remains uncertain. A meta-analysis of 11 randomized controlled trials involving 2,749 patients reported that levothyroxine treatment reduced the risk of pregnancy loss, with a risk ratio (RR) of 0.69 and a 95% confidence interval (CI) of 0.52–0.91, but did not significantly increase the live birth rate (RR, 1.01; 95% CI, 0.99–1.03) (7).

Consequently, GHT management should shift from post-diagnostic intervention toward early risk prediction and individualized monitoring.

Nutritional, metabolic, and environmental factors regulate thyroid homeostasis during pregnancy. Iodine is a substrate for thyroid hormone synthesis. In a study of 559 pregnant women, serum iodine concentration was associated with FT4 levels across pregnancy stages, and morning urinary iodine concentration identified high TSH and low TSH with AUCs of 0.688 and 0.753, respectively (8). Studies in early pregnancy also reported insufficient urinary iodine in some pregnant women despite adequate iodine nutrition at the population level. These findings support the use of pregnancy-specific reference ranges for thyroid function assessment (9).

Iron status is also associated with thyroid function during pregnancy. A systematic review and meta-analysis of 47 studies involving 53,152 pregnant women reported higher TSH levels and lower FT4 levels in women with iron deficiency than in those with sufficient iron. Hemoglobin was negatively correlated with TSH and positively correlated with FT4 (10). Nutritional evidence further indicates that iodine, selenium, iron, zinc, copper, magnesium, vitamin A, and other micronutrients participate in thyroid hormone synthesis and regulation (11).

In addition, during pregnancy, copper, magnesium, zinc, iron, and other metal elements are associated with maternal thyroid function and metabolic status. Vitamin D status and heavy metal exposure may also affect thyroid homeostasis during pregnancy through immune regulation, oxidative stress, or endocrine disruption (12–14). Thyroid function is also linked to metabolic abnormalities during pregnancy. A prospective cohort study of 26,742 pregnant women reported that elevated TSH in early pregnancy was associated with increased risk of subsequent gestational diabetes mellitus (15).

Taken together, these findings indicate that GHT-related risk may reflect a combined imbalance involving nutrition, trace elements, metabolism, and environmental exposure.

When multidimensional clinical variables and laboratory markers contribute to disease occurrence, traditional linear statistical models may not fully capture nonlinear associations or potential interactions among variables (16). Machine learning methods can integrate high-dimensional features, identify nonlinear associations, and model complex interactions. Shapley Additive Explanations (SHAP) can quantify the direction of contribution, relative importance, and potential threshold effects of each feature on the model output, thereby improving model readability and interpretability in clinical settings. For risk identification during pregnancy, this framework combines prediction and interpretation and may be more suitable for clinical decision support than traditional univariable or linear methods (17, 18).

In recent years, machine learning models have been increasingly used for prediction, management, and pathophysiological assessment of pregnancy-related diseases, including gestational diabetes mellitus, preeclampsia, preterm birth, and fetal growth restriction (19–21). Previous studies have examined GHT in relation to prevalence, risk factors, nutritional status, and pregnancy outcomes. However, evidence remains limited on the prediction of incident GHT using clinical laboratory markers. Therefore, this study included pregnant women who first visited Shanxian Central Hospital between 2021 and 2025 and had no GHT diagnosis at baseline.

The objective was to develop and validate a machine-learning predictive model based on multidimensional laboratory indicators and to apply SHAP for model interpretation, thereby supporting early risk assessment and individualized monitoring of GHT. The graphical overview and program workflow of the study are presented in Figure 1, summarizing the transition from data extraction and participant screening to missing-data handling, feature selection, model development, model interpretation, and Shiny-based deployment.

FIGURE 1

Graphical overview and program workflow of the study. The workflow summarizes data extraction, participant screening, missing-data handling, feature selection, model development and validation, SHAP-based interpretation, and Shiny-based deployment.

Figure image at the original source — open the original paper. This file is not included in this text import.

Materials and methods

Study design, participants, and outcome ascertainment

This single-center retrospective study was designed for prediction model development and internal validation. De-identified electronic medical records and laboratory information system data were used to retrospectively screen pregnant women who had their first eligible prenatal visit between 2021 and 2025. The first eligible visit was defined as the earliest visit during the current pregnancy at which the participant did not meet the diagnostic criteria for GHT and had the clinical and laboratory variables required for model development.

A total of 407 pregnant women with available post-baseline thyroid function records or prenatal follow-up information sufficient for outcome ascertainment were included in the final analytic dataset, including 164 who developed incident GHT and 243 who did not. The observed event fraction of 40.3% reflects the outcome distribution of the analytic dataset and was not intended to estimate the population incidence of incident GHT among unselected pregnant women. All data were obtained from the hospital’s electronic medical record and laboratory information systems.

After extraction, all study data were de-identified and used only for statistical analysis and model development. Given the retrospective design and absence of additional intervention, informed consent was waived. The study was approved by the Medical Ethics Committee of Shanxian Central Hospital (approval number: LL 2026022).

The GHT group included overt hypothyroidism and subclinical hypothyroidism. According to current clinical guidelines for thyroid disease during pregnancy, overt hypothyroidism was defined as elevated TSH with decreased FT4, and subclinical hypothyroidism was defined as elevated TSH with FT4 within the reference range. In this study, GHT was defined as TSH > 4.20 μIU/mL after the first eligible visit, with FT4 < 12 pmol/L for overt hypothyroidism and FT4 within 12–22 pmol/L for subclinical hypothyroidism (22). Outcome status was determined from available retrospective post-baseline records.

Incident GHT was defined as the first post-baseline thyroid function result that met the diagnostic criteria for overt or subclinical hypothyroidism. Participants were classified as non-GHT if no available post-baseline thyroid function record or prenatal follow-up information met the diagnostic criteria for GHT.

The inclusion criteria were as follows: (1) completion of thyroid function testing and concurrent clinical laboratory tests required for model development at the first visit during the current pregnancy, without meeting the diagnostic criteria for GHT at that visit; (2) availability of subsequent thyroid function retesting or clinical follow-up data sufficient to determine whether incident GHT occurred after the first visit; (3) availability of baseline clinical data and laboratory measurements required for model development; and (4) for participants with multiple visit records, retention of only the first record that met the inclusion criteria and contained complete data.

The exclusion criteria were as follows: (1) confirmed thyroid disease before pregnancy or long-term use of thyroid-related treatment, including levothyroxine; (2) fulfillment of the diagnostic criteria for GHT at the first visit; (3) comorbid conditions that could affect thyroid function, trace element metabolism, nutritional status, or inflammatory status, including severe hepatic or renal dysfunction, hematologic diseases, autoimmune diseases, and malignant tumors; (4) acute infection, systemic inflammatory response, or other acute stress states; and (5) substantial missingness in key variables or inability to determine the follow-up outcome.

Candidate predictors and missing-data handling

All study variables were extracted from the electronic medical record system and laboratory information system at the first visit. Candidate predictors were selected according to clinical relevance, availability in the hospital electronic medical record and laboratory information systems, and prior evidence. These variables included general clinical characteristics, trace elements and minerals, vitamin-related markers, biochemical metabolic markers, and hematologic markers. General clinical characteristics included age and gestational week (GW) at the first visit. Trace elements and minerals included zinc (Zn), iron (Fe), copper (Cu), calcium (Ca), phosphorus (P), and magnesium (Mg).

Vitamin-related markers included vitamin A (vitA), vitamin D (vitD), vitamin E (vitE), and vitamin D3 (vitD3). Biochemical metabolic markers included albumin (ALB), alanine aminotransferase (ALT), alkaline phosphatase (ALP), total bile acid (TBA), urea (UREA), glucose (GLU), cholyglycine (CG), aspartate aminotransferase (AST), creatinine (CREA), uric acid (UA), lactate dehydrogenase (LDH), and gamma-glutamyl transferase (GGT). Hematologic markers included white blood cell count (WBC), neutrophil count (NEUT), lymphocyte count (LYMPH), red blood cell count (RBC), platelet count (PLT), mean corpuscular volume (MCV), mean corpuscular hemoglobin (MCH), and mean corpuscular hemoglobin concentration (MCHC).

Missing data patterns were assessed before imputation and are summarized in Supplementary Table S1. A total of 72 participants had at least one missing value, corresponding to 111 missing values in the original dataset. The highest missing proportion was observed for phosphorus (P; 4.18%), followed by lactate dehydrogenase (LDH; 3.44%) and zinc (Zn; 3.44%). Among the final retained predictors, missingness ranged from 0 to 3.44%. Missing values were handled using multiple imputation by chained equations (MICE), with five imputed datasets generated using a fixed random seed of 123.

Multiple imputation was used to reduce sample loss, loss of statistical power, and potential selection bias from complete-case analysis. The imputed data were then used for subsequent feature selection, model development, and validation analyses. To reduce information leakage, the training and validation sets were first separated, and preprocessing procedures, including imputation and standardization, were implemented within the modeling workflow.

Feature selection strategy

To reduce redundancy and potential multicollinearity among candidate predictors and improve model stability, this study used a feature selection strategy that combined Least Absolute Shrinkage and Selection Operator (LASSO) regression, the Boruta algorithm, and random forest variable-importance ranking. This combined strategy was chosen to reduce reliance on a single feature-selection algorithm and to identify predictors with stable contributions across both penalized regression and tree-based importance measures. All feature selection procedures were performed in the training set.

First, LASSO regression was applied to candidate variables in the training set using the glmnet package. A penalty term was imposed on the regression coefficients to perform variable shrinkage and dimensionality reduction. The optimal penalty parameter λ was determined using 10-fold cross-validation. Variables with coefficients shrunk to zero were excluded. Subsequently, the Boruta algorithm, based on the random forest framework, was applied to the candidate features to assess variable importance. This algorithm constructs shadow features and compares the importance distributions of real and shadow features to identify variables with stable discriminative value across repeated training.

In parallel, a random forest model was used to compute importance scores for candidate variables and rank them by their contribution to the classification task. Finally, the results from LASSO regression, the Boruta algorithm, and random forest variable-importance ranking were integrated to define the core feature subset for subsequent machine-learning model development. A Spearman correlation heatmap was generated to assess the correlation structure among the selected features and to examine whether marked clusters of high correlation were present.

Model development and evaluation

After feature selection, the final feature subset was used as input variables to develop machine learning models for predicting incident GHT. The final analytic dataset was divided into a training set and an internal validation set at an approximate 7:3 ratio. The training set included 286 participants, comprising 115 women with incident GHT and 171 women without GHT. The internal validation set included 121 participants, comprising 49 women with incident GHT and 72 women without GHT.

The evaluated models included RandomForest, support vector machine with kernel function (SVM_Kernel), logistic regression model (LogisticModel), neighbor-based method (NeighborMethod), partial least squares model (PLSModel), BoostingMethod, neural network model (NeuralNet), Bayesian model (BayesMethod), DiscriminantModel, Least Absolute Shrinkage and Selection Operator model (Lasso), Adaptive Boosting, and Light Gradient Boosting Machine (LightGBM). To ensure comparability across models, all models were trained and evaluated using the same data partition, input features, and preprocessing workflow. For threshold-dependent performance metrics, including accuracy, PPV, sensitivity, specificity, F1 score, Youden’s J statistic, and NPV, predicted probabilities were converted into binary classifications using a prespecified probability cutoff of 0.5.

Participants with predicted probabilities ≥ 0.5 were classified as GHT, whereas those with predicted probabilities < 0.5 were classified as non-GHT. No class weighting, oversampling, undersampling, SMOTE, or other resampling strategy was applied during model training. Model discrimination was assessed using the receiver operating characteristic (ROC) curve and the AUC, with 95% CIs calculated for the AUC. Classification performance was evaluated using accuracy, positive predictive value (PPV), sensitivity, specificity, F1 score, Youden’s J statistic, and negative predictive value (NPV). Model calibration was assessed using calibration curves and quantitative calibration metrics, including the Brier score, calibration intercept, and calibration slope.

Potential clinical utility was assessed using decision curve analysis (DCA) and clinical impact curves. Prediction error distributions were further examined through residual analysis, including reverse-cumulative absolute residual curves and residual box plots. The final model was selected according to overall performance rather than validation AUC alone, with consideration of discrimination, threshold-dependent classification performance, calibration, clinical net benefit, residual distribution, and interpretability.

SHAP-based model interpretation and visualization

To improve the interpretability of the final prediction model, SHAP was used to interpret model outputs. SHAP was selected because it provides both global and individual-level explanations, allowing the relative importance, direction, and magnitude of each predictor’s contribution to be visualized. SHAP analysis quantified the direction and magnitude of each input feature’s contribution to the predicted outcome and assessed the relative role of each variable in the prediction process. First, the mean absolute SHAP value for each variable was computed to assess global feature importance, and the variables were ranked accordingly.

A SHAP summary plot was generated to display the distribution of feature values and the direction of their effects on model output. SHAP dependence plots were then generated to examine the relationship between individual variables and model output. At the individual level, SHAP waterfall and force plots were used to present the composition of the prediction for a single sample and to visualize the positive or negative contribution of each variable to the predicted value.

Statistical analysis

Basic statistical analyses and model-related calculations were performed using SPSS version 27.0 and R version 4.5.1. The main R packages used for model development and feature selection included lightgbm version 4.6.0, Boruta version 8.0.0, and glmnet version 4.1–10. SHAP-based interpretation analyses were performed in Python version 3.12 using the shap package version 0.51.0. Continuous variables with a normal distribution were reported as mean ± standard deviation (SD) and compared between groups using the independent-samples t-test. Continuous variables with non-normal distributions were reported as medians and interquartile ranges (IQRs) and compared between groups using the Wilcoxon rank-sum test.

Categorical variables were reported as n (%) and compared between groups using the χ2 test or Fisher’s exact test, as appropriate. All statistical tests were two-sided, and P < 0.05 was considered statistically significant. For baseline characteristics in Table 1, P-values were reported as descriptive unadjusted comparisons, and no multiple-comparison correction was applied. These baseline comparisons were not used as the sole basis for predictor selection.

TABLE 1

Baseline characteristics.

VariablesTotal (N = 407)No-GHT (N = 243)GHT (N = 164)P-value
Age (years)30.00 (27.00, 34.00)30.00 (27.00, 34.00)30.00 (27.00, 34.00)0.603
GW (weeks)10.00 [9.00, 12.00]10.00 [8.00, 12.00]11.00 (9.00, 13.00)< 0.001
Zn (μmol/L)114.52 ± 19.69119.81 ± 18.33106.68 ± 19.06< 0.001
Fe (mmol/L)8.93 ± 1.029.15 ± 0.968.60 ± 1.03< 0.001
Cu (μmol/L)24.46 ± 4.7123.35 ± 4.5026.11 ± 4.53< 0.001
Ca (mmol/L)2.27 ± 0.082.29 ± 0.072.25 ± 0.07< 0.001
P(mmol/L)1.02 ± 0.101.04 ± 0.091.01 ± 0.100.004
Mg (mmol/L)0.84 (0.81, 0.87)0.85 (0.82, 0.87)0.84 (0.80, 0.86)0.003
vitA (ng/mL)0.36 ± 0.060.37 ± 0.060.35 ± 0.05< 0.001
vitD (ng/mL)40.57 ± 6.7341.75 ± 6.5838.83 ± 6.57< 0.001
vitE (ng/mL)6.37 ± 1.056.54 ± 1.036.10 ± 1.03< 0.001
vitD3 (pg/mL)34.15 ± 5.2134.72 ± 5.1033.32 ± 5.290.008
ALB (g/L)40.65 ± 2.9441.32 ± 2.7739.67 ± 2.92< 0.001
ALT (U/L)14.90 (11.00, 18.45)14.00 (10.30, 17.05)16.40 (13.17, 19.83)< 0.001
ALP (U/L)69.50 (56.95, 80.90)64.70 (52.45, 75.60)76.55 (66.18, 89.43)< 0.001
TBA (μmol/L)2.34 (1.86, 2.91)2.34 (1.85, 2.92)2.33 (1.90, 2.89)0.950
UREA (mmol/L)2.88 ± 0.602.86 ± 0.632.91 ± 0.560.429
GLU (mmol/L)4.73 ± 0.564.73 ± 0.584.73 ± 0.520.988
CG (μg/mL)3.48 ± 0.913.47 ± 0.873.50 ± 0.960.689
AST (U/L)18.29 ± 4.0817.86 ± 4.0218.92 ± 4.100.010
CREA (μmol/L)45.28 ± 6.8745.38 ± 6.7345.13 ± 7.090.716
UA (μmol/L)214.89 ± 30.12211.59 ± 29.37219.78 ± 30.630.007
LDH (U/L)148.60 (135.95, 162.95)145.40 (132.40, 159.60)154.05 (143.05, 169.48)< 0.001
GGT (U/L)11.97 ± 3.0911.66 ± 3.1112.43 ± 3.010.014
WBC ( × 109/L)8.66 ± 1.228.45 ± 1.188.98 ± 1.21< 0.001
NEUT ( × 109/L)5.60 ± 1.005.37 ± 0.935.94 ± 1.00< 0.001
LYMPH ( × 109/L)1.91 ± 0.381.95 ± 0.381.85 ± 0.390.010
RBC ( × 1012/L)4.28 ± 0.344.29 ± 0.334.26 ± 0.350.512
PLT ( × 109/L)270.16 ± 33.20274.27 ± 33.33264.07 ± 32.150.002
MCV (fL)87.71 ± 4.8687.64 ± 5.0287.82 ± 4.640.724
MCH (pg)29.94 ± 1.8129.97 ± 1.7929.90 ± 1.850.707
MCHC (g/L)338.00 (331.00, 345.00)337.00 (330.00, 343.00)341.00 (333.00, 347.00)0.003

GW, gestational week; Zn, zinc; Fe, iron; Cu, copper; Ca, calcium; P, phosphorus; Mg, magnesium; vitA, vitamin A; vitD, vitamin D; vitE, vitamin E; vitD3, vitamin D3; ALB, albumin; ALT, alanine aminotransferase; ALP, alkaline phosphatase; TBA, total bile acid; UREA, urea; GLU, glucose; CG, cholyglycine; AST, aspartate aminotransferase; CREA, creatinine; UA, uric acid; LDH, lactate dehydrogenase; GGT, gamma-glutamyl transferase; WBC, white blood cell count; NEUT, neutrophil count; LYMPH, lymphocyte count; RBC, red blood cell count; PLT, platelet count; MCV, mean corpuscular volume; MCH, mean corpuscular hemoglobin; MCHC, mean corpuscular hemoglobin concentration; GHT, gestational hypothyroidism.

Results

Patient characteristics

A total of 407 pregnant women were included in this study, comprising 243 in the No-GHT group and 164 in the GHT group. Age did not differ significantly between the two groups (P = 0.603). Compared with the No-GHT group, the GHT group had lower levels of Zn, Fe, Ca, P, Mg, vitA, vitD, vitE, vitD3, and ALB, and a higher level of Cu, with unadjusted P < 0.05. In addition, the GHT group had higher levels of ALT, ALP, AST, UA, LDH, GGT, WBC, NEUT, and MCHC, and lower levels of LYMPH and PLT than the No-GHT group, also with unadjusted P < 0.05.

No significant differences were observed between the two groups in TBA, UREA, GLU, CG, CREA, RBC, MCV, or MCH (Table 1).

Selection of modeling variables

To improve the stability of variable selection and reduce selection bias associated with a single algorithm, this study combined LASSO regression, the Boruta algorithm, and random forest variable importance ranking for feature selection. The optimal penalty parameter λ in LASSO regression was determined by cross-validation. As λ increased, the regression coefficients gradually shrank, and 9 candidate variables were retained (Figures 2A,B). The Boruta algorithm identified variables with stable discriminative contribution by comparing the importance of original variables with that of shadow variables.

Zn, ALP, Fe, and ALB ranked high in importance scores (Figures 2C,D). Random forest analysis ranked candidate variables by importance. To highlight the main discriminative variables, only the top 15 variables were presented. Zn and ALP ranked highest in importance (Figure 2E). The random forest error curve plateaued as the number of decision trees increased (Figure 2F). The intersection of the three feature selection methods yielded 9 core variables, including Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP, which were then used in subsequent model development (Figure 2G).

The correlation heatmap showed no pronounced clustering of high correlations among the selected variables (Figure 2H).

FIGURE 2

Variable selection and correlation analysis. (A) Ten-fold cross-validation curve of LASSO regression for determining the optimal penalty parameter λ. (B) LASSO coefficient path plot showing coefficient shrinkage across different λ values. (C) Variable importance trajectories across classifier runs in the Boruta algorithm. (D) Distribution and ranking of variable importance identified by the Boruta algorithm. (E) Variable importance ranking based on the random forest model. (F) Changes in random forest model error with increasing numbers of trees. (G) Venn diagram of variables selected by LASSO, Boruta, and random forest. (H) Spearman correlation heatmap of the final selected variables. *P < 0.05, **P < 0.01, and ***P < 0.001.

Figure image at the original source — open the original paper. This file is not included in this text import.

Model development and performance assessment

Based on the final 9 selected variables, this study developed and compared 12 machine learning models: RandomForest, SVM_Kernel, LogisticModel, NeighborMethod, PLSModel, BoostingMethod, NeuralNet, BayesMethod, DiscriminantModel, Lasso, AdaptiveBoosting, and LightGBM.

In the training set, LightGBM yielded the highest overall performance, with an AUC of 0.971 (95% CI, 0.953–0.988). LightGBM also achieved the highest accuracy (0.906), PPV (0.907), sensitivity (0.852), specificity (0.942), F1 score (0.879), Youden’s J statistic (0.794), and NPV (0.904) (Figures 3A,C,E and Table 2). In the validation set, all models retained discriminatory ability. Lasso had the highest AUC of 0.918 (95% CI, 0.871–0.964), whereas LightGBM had a comparable AUC of 0.916 (95% CI, 0.866–0.965), with an absolute difference of 0.002 (Figures 3B,D).

Although LightGBM did not yield the numerically highest AUC, it achieved the highest accuracy (0.843), PPV (0.857), specificity (0.917), F1 score (0.791), and Youden’s J statistic (0.651) in the validation set. Considering the negligible AUC difference and the more balanced threshold-dependent classification performance, LightGBM was retained for further comprehensive evaluation and interpretation (Figure 3F and Table 3).

FIGURE 3

Discrimination and classification performance of machine learning models in the training and validation sets. (A) ROC curves in the training set. (B) ROC curves in the validation set. (C) Forest plot of AUC values in the training set. (D) Forest plot of AUC values in the validation set. (E) Comparison of classification performance metrics in the training set. (F) Comparison of classification performance metrics in the validation set.

Figure image at the original source — open the original paper. This file is not included in this text import.
TABLE 2

Performance of machine learning models in the training set.

ModelAUC (95% CI)AccuracyPPVSensitivitySpecificityF1 scoreYouden’s JNPV
RandomForest0.859 (0.816–0.903)0.7970.7940.6700.8830.7260.5530.799
SVM_Kernel0.866 (0.823–0.908)0.7900.7430.7300.8300.7370.5610.821
LogisticModel0.868 (0.825–0.910)0.8040.7660.7390.8480.7520.5870.829
NeighborMethod0.736 (0.679–0.793)0.7030.6600.5390.8130.5930.3520.724
PLSModel0.821 (0.772–0.870)0.7730.7550.6430.8600.6950.5030.782
BoostingMethod0.844 (0.798–0.889)0.7730.7450.6610.8480.7000.5090.788
NeuralNet0.804 (0.751–0.858)0.7520.6960.6780.8010.6870.4790.787
BayesMethod0.867 (0.825–0.909)0.7940.7370.7570.8190.7470.5750.833
DiscriminantModel0.870 (0.828–0.912)0.7940.7550.7220.8420.7380.5640.818
Lasso0.872 (0.830–0.913)0.7900.7570.7040.8480.7300.5520.810
AdaptiveBoosting0.871 (0.831–0.911)0.7900.7570.7040.8480.7300.5520.810
LightGBM0.971 (0.953–0.988)0.9060.9070.8520.9420.8790.7940.904

AUC, area under the receiver operating characteristic curve; CI, confidence interval; PPV, positive predictive value; NPV, negative predictive value; SVM, support vector machine; PLS, partial least squares; Lasso, least absolute shrinkage and selection operator; LightGBM, light gradient boosting machine.

TABLE 3

Performance of machine learning models in the validation set.

ModelAUC (95% CI)AccuracyPPVSensitivitySpecificityF1 scoreYouden’s JNPV
RandomForest0.911 (0.861–0.962)0.8180.8290.6940.9030.7560.5970.813
SVM_Kernel0.916 (0.869–0.963)0.8100.7710.7550.8470.7630.6020.836
LogisticModel0.917 (0.870–0.963)0.8260.8330.7140.9030.7690.6170.823
NeighborMethod0.830 (0.758–0.903)0.7270.6740.6330.7920.6530.4240.760
PLSModel0.878 (0.817–0.938)0.7930.7730.6940.8610.7310.5550.805
BoostingMethod0.911 (0.860–0.962)0.8020.7780.7140.8610.7450.5750.816
NeuralNet0.884 (0.825–0.942)0.8100.7710.7550.8470.7630.6020.836
BayesMethod0.912 (0.864–0.960)0.8100.7950.7140.8750.7530.5890.818
DiscriminantModel0.916 (0.869–0.963)0.8180.8140.7140.8890.7610.6030.821
Lasso0.918 (0.871–0.964)0.8180.8290.6940.9030.7560.5970.813
AdaptiveBoosting0.855 (0.789–0.920)0.7440.7050.6330.8190.6670.4520.766
LightGBM0.916 (0.866–0.965)0.8430.8570.7350.9170.7910.6510.835

AUC, area under the receiver operating characteristic curve; CI, confidence interval; PPV, positive predictive value; NPV, negative predictive value; SVM, support vector machine; PLS, partial least squares; Lasso, least absolute shrinkage and selection operator; LightGBM, light gradient boosting machine.

Calibration curves showed overall agreement between predicted probabilities and observed outcomes in the training and internal validation sets (Figures 4A,B). Quantitative calibration metrics are shown in Supplementary Table S2. In the internal validation set, DiscriminantModel, LogisticModel, and SVM_Kernel had relatively low Brier scores of 0.119, 0.119, and 0.120, respectively. For the final LightGBM model, the Brier score, calibration intercept, and calibration slope were 0.077, 0.022, and 2.198 in the training set, and 0.131, 0.096, and 1.040 in the internal validation set, respectively.

These results indicated acceptable calibration performance of LightGBM in the internal validation set. DCA yielded positive net benefit for most models within specific threshold probability ranges (Figures 4C,D). Clinical impact curves indicated that the predicted number of high-risk cases decreased as the risk threshold increased, with a trend generally consistent with the number of observed events (Figures 4E,F). The LightGBM confusion matrices further supported its classification performance on both the training and validation sets (Figures 4G,H).

FIGURE 4

Calibration, clinical utility, and confusion matrices of the LightGBM model. (A) Calibration curves in the training set. (B) Calibration curves in the validation set. (C) Decision curve analysis in the training set. (D) Decision curve analysis in the validation set. (E) Clinical impact curves in the training set. (F) Clinical impact curves in the validation set. (G) Confusion matrix of the LightGBM model in the training set. (H) Confusion matrix of the LightGBM model in the validation set.

Figure image at the original source — open the original paper. This file is not included in this text import.

Residual analysis was performed to assess the distribution of prediction errors. Reverse cumulative absolute residual curves and residual box plots demonstrated differences in residual distributions across models. LightGBM exhibited relatively low and stable residual levels in both the training and validation sets, with no marked clustering of large residuals (Figures 5A–D). Based on its comparable discrimination, balanced classification performance, acceptable calibration in the internal validation set, clinical net benefit, residual distribution, and compatibility with SHAP-based interpretation, LightGBM was selected as the final model for subsequent interpretation analysis.

FIGURE 5

Residual distribution analysis of machine learning models. (A) Reverse cumulative absolute residual distribution in the training set. (B) Reverse cumulative absolute residual distribution in the validation set (C). Boxplot of absolute residuals in the training set. (D) Boxplot of absolute residuals in the validation set.

Figure image at the original source — open the original paper. This file is not included in this text import.

In the GW-adjusted sensitivity analysis, the LightGBM model achieved an AUC of 0.977 in the training set and 0.915 in the internal validation set, which was comparable to the primary model. In the gain-based feature-importance ranking, ALP remained the leading predictor, whereas GW showed the lowest contribution among the included variables (Supplementary Table S3). These findings suggest that the predictive contribution of ALP was not fully explained by gestational week.

SHAP-based model interpretation

To further interpret the predictions generated by LightGBM, this study used SHAP to quantify each variable’s contribution to the model’s output. Ranking by mean absolute SHAP value identified Zn as the largest contributor to model prediction, followed by ALP, ALB, Cu, vitE, ALT, Fe, Ca, and vitD (Figure 6A). The SHAP summary plot demonstrated heterogeneous directions of feature effects. Lower levels of Zn, ALB, Fe, Ca, vitD, and vitE generally shifted model output toward higher GHT risk. In contrast, higher levels of ALP, Cu, and ALT were generally associated with higher predicted risk (Figure 6B).

FIGURE 6

SHAP-based interpretation of the LightGBM model. (A) Variable importance ranking based on mean absolute SHAP values; (B) SHAP summary plot showing the distribution of feature values and their direction of contribution to model output; (C) SHAP waterfall plot for sample 1; (D) SHAP waterfall plot for sample 2; (E) SHAP force plot for sample 1, corresponding to the same individual shown in (C); (F) SHAP force plot for sample 2, corresponding to the same individual shown in (D).

Figure image at the original source — open the original paper. This file is not included in this text import.

0

Individual-level SHAP interpretation demonstrated that model predictions were jointly determined by multiple variables rather than dominated by a single indicator. For sample 1, Zn made a positive contribution to the prediction, whereas Cu, ALB, ALP, and ALT mainly made negative contributions, resulting in a final model output of f(x) = -0.0378 (Figure 6C). The corresponding SHAP force plot displayed the cumulative direction and magnitude of each variable contribution for this sample (Figure 6E). For sample 2, Cu, ALT, vitD, and Zn mainly shifted the prediction in the negative direction.

In contrast, Ca made a relatively strong positive contribution to model output, resulting in a final model output of f(x) = -0.167 (Figure 6D). The SHAP force plot for this sample was consistent with the waterfall plot and indicated that the prediction was also determined by the combined effects of multiple variables (Figure 6F).

SHAP dependence plots further identified nonlinear relationships between individual variables and model output. Zn, Fe, Ca, vitD, vitE, and ALB showed overall negative trends, with higher levels generally associated with lower SHAP values. In contrast, Cu, ALT, and ALP exhibited overall positive trends, with higher levels generally corresponding to higher SHAP values (Figure 7). These findings indicated that multivariable effects, nonlinearity, and directional heterogeneity characterized the GHT-related risk pattern captured by LightGBM.

FIGURE 7

SHAP dependence plots of variables in the LightGBM model. The plots show the relationships between Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP and their corresponding SHAP values. The x-axis represents the feature value, the y-axis represents the SHAP value, and the color scale indicates the interacting feature’s value, illustrating potential nonlinear associations between predictors and the model output.

Figure image at the original source — open the original paper. This file is not included in this text import.

Model deployment and visualization applications

To improve the accessibility and usability of LightGBM, this study deployed the model as a Shiny-based online risk prediction system. The system incorporated the 9 final model features, including Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP. After entering the corresponding values, users can obtain the predicted probability of individual GHT risk and the corresponding risk stratification result in real time (Figure 8). The system also provides an individualized SHAP-based interpretation interface. This interface displays the direction and magnitude of each feature’s contribution to the current prediction, thereby presenting model output and interpretability results within the same workflow.

The online tool has been released on ShinyApps.io at https://predicttheoutcome123.shinyapps.io/shiny_lgb_project/. Overall, this deployment provides a direct interface for individualized risk assessment and interpretability visualization based on LightGBM.

FIGURE 8

Web-based risk prediction calculator for GHT based on the LightGBM model. The Shiny-based calculator incorporates the nine variables in the final model: Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP. After entering the corresponding clinical indicators, the system provides the individualized predicted probability of GHT and the corresponding risk classification in real time. A SHAP-based explanation plot is also provided to visualize the direction and magnitude of each variable’s contribution to the individual prediction.

Figure image at the original source — open the original paper. This file is not included in this text import.

Discussion

This study developed and validated machine learning models for predicting the risk of incident GHT. By integrating LASSO regression, the Boruta algorithm, and random forest variable importance ranking, 9 core variables were identified: Zn, Fe, Cu, Ca, vitD, vitE, ALB, ALT, and ALP. Among 12 models, LightGBM showed the best overall performance in the training set. In the internal validation set, Lasso had a slightly higher AUC than LightGBM; however, the absolute difference was only 0.002. LightGBM showed more balanced performance in accuracy, PPV, specificity, F1 score, and Youden’s J statistic, and it also demonstrated acceptable calibration in the internal validation set, clinical net benefit, and stable residual distribution.

Therefore, LightGBM was selected as the final model based on overall performance rather than AUC alone. SHAP analysis further identified Zn as the largest contributor to model output, followed by ALP, ALB, Cu, vitE, ALT, Fe, Ca, and vitD. These findings suggest that incident GHT risk was captured by a multidimensional laboratory profile rather than by a single thyroid function marker. The profile involved trace element homeostasis, vitamin status, protein nutritional reserve, and liver-related metabolic markers.

Mineral-related variables occupied a central position in the final model. Gu et al evaluated the individual and combined effects of iodine, selenium, zinc, calcium, magnesium, and iron on thyroid hormones in 489 Chinese pregnant women and reported that Ca was positively associated with FT3, whereas Zn was positively associated with FT4. These findings indicate an association between mineral status and the thyroid hormone profile during pregnancy (23). A machine learning study using National Health and Nutrition Examination Survey (NHANES) data from 7,779 participants further identified nonlinear relationships between multiple mineral intakes and thyroid dysfunction.

Ca, Zn, Mg, and related indicators were associated with a lower risk of thyroid dysfunction (24). The case-control study by Vargas-Uricoechea et al also reported that zinc deficiency was associated with higher frequencies of functional thyroid disease and thyroid autoimmunity (25). These findings are consistent with the direction observed in this study, in which lower levels of Zn, Fe, and Ca were associated with a higher predicted risk of GHT. At the mechanistic level, Zn and Fe are important regulators of thyroid peroxidase (TPO) activity.

TPO is a key enzyme in thyroid hormone synthesis, catalyzing iodine oxidation and tyrosine iodination. Deficiency of Zn and Fe may affect TPO catalytic activity and reduce the efficiency of thyroid hormone synthesis (12, 26). Abnormal serum Ca may also contribute to the occurrence and development of GHT by affecting intracellular Ca2+ signaling in thyroid cells, particularly through iodine organification and thyroid hormone release mediated by the TSH downstream Gq/G11–PLC–Ca2+ pathway (27).

The inclusion of vitamin markers and metal elements further indicates that GHT risk is associated with nutritional status and oxidative stress. Zheng et al reported that vitamin D deficiency in early pregnancy was associated with increased risk of GHT, with an adjusted odds ratio (OR) of 1.32 (95% CI, 1.01–1.74) (28). Liu et al used NHANES data and reported that higher vitamin E intake was associated with lower prevalence of subclinical hypothyroidism and autoimmune thyroiditis. However, this association was mainly observed in men (29).

These findings are generally consistent with the direction identified in this study, in which lower levels of vitD and vitE were associated with a higher predicted risk of GHT. However, they also indicate that the role of vitamin markers may vary across populations, measurement methods, and gestational stages. In addition, higher Cu levels in this study shifted model output toward higher GHT risk. Zhou et al reported that prenatal exposure to metal mixtures was associated with altered neonatal thyroid function in 2,444 mother-infant pairs (30).

At the mechanistic level, Cu is a key cofactor for several antioxidant enzymes, including ceruloplasmin (CP) and superoxide dismutase (SOD). These enzymes participate in the clearance of reactive oxygen species (ROS) in thyroid cells. Disrupted Cu homeostasis may affect antioxidant enzyme activity, alter oxidative stress in thyroid cells, and affect thyroid hormone synthesis and secretion (31, 32).

ALB, ALT, and ALP were retained simultaneously in the final model. Previous research has reported associations of GHT with liver function markers and neonatal birth weight, suggesting potential interactions among thyroid dysfunction, hepatic metabolic status, and pregnancy outcomes (33). Mechanistically, the liver participates in the synthesis of binding proteins, including albumin, thyroxine-binding globulin, and transthyretin, and contributes to peripheral conversion of T4 to T3. Thyroid hormones also regulate hepatic glucose and lipid metabolism, bile acid metabolism, and mitochondrial function (34).

Therefore, the associations of ALB, ALT, and ALP with GHT risk in this study may reflect combined changes in protein nutritional reserve, hepatic metabolic adaptation, pregnancy-related physiological changes, and the thyroid axis. Because ALP may vary physiologically during pregnancy, its contribution should be interpreted with consideration of gestational timing. In the GW-adjusted sensitivity analysis, ALP remained the leading feature, whereas GW showed the lowest contribution, suggesting that the predictive role of ALP was not fully attributable to gestational week. These findings should not be directly interpreted as specific signals of liver disease.

Methodologically, this study compared 12 models under the same feature input, data partition, and preprocessing framework. Recent advances in machine learning and deep learning have supported computer-aided diagnosis and risk prediction across different medical fields, including image-based disease detection and endocrine disorder assessment. Yadav et al. developed an automatic computer-aided diagnosis tool for glaucoma detection using U-Net and CNN on retinal fundus images (35). Dhanka et al. reviewed advances in machine learning and deep learning for hormonal disorder diagnosis, including PCOS, thyroid disorders, and optimization techniques (36).

Recent studies have also increasingly applied machine learning to pregnancy-related risk stratification. For example, Xing et al. developed GDMPredictor, a machine-learning tool for gestational diabetes mellitus risk assessment and treatment recommendation based on clinical and biochemical records (37). Compared with such broader gestational disease prediction tools, the present study focused on incident GHT and adopted a relatively parsimonious laboratory-marker model combined with SHAP-based interpretation to support risk stratification and individualized monitoring. Model performance was evaluated using discrimination, classification metrics, calibration, clinical net benefit, and residual distribution.

The TRIPOD+AI statement emphasizes that clinical prediction models developed using regression or machine-learning methods should transparently report data sources, predictors, missing-data handling, model development, validation, and performance evaluation (38). PROBAST+AI further emphasizes assessment of risk of bias, applicability, and conditions for external generalization in prediction model studies (39). In obstetrics, LightGBM combined with SHAP has been used to predict sleep disorders during pregnancy and provided feature-level explanations (40). Studies predicting adverse outcomes in gestational diabetes mellitus also indicate that machine learning models may perform well in development datasets, but performance may decrease during external validation (41).

Khan et al used interpretable machine learning to predict preterm birth in 3,509 pregnant women and emphasized that SHAP can support interpretation of individual predictions but cannot replace external validation (42). Therefore, the selection of LightGBM and the use of SHAP interpretation in this study are methodologically appropriate, whereas clinical implementation still requires further validation.

This study provides an interpretable auxiliary tool for GHT risk stratification at the first prenatal assessment. The model is not intended to replace TSH and FT4 testing or clinical diagnosis. It uses clinical laboratory markers to identify pregnant women at increased risk of subsequent GHT, thereby providing a reference for thyroid function retesting, nutritional assessment, and individualized follow-up. Similarly, Wang et al. showed, using an interpretable machine learning model for perinatal depression, that external validation and an interpretability framework may improve the usability of models in clinical risk screening (43).

Studies on explainable artificial intelligence in medicine have also noted that methods such as SHAP can improve model transparency. However, SHAP results remain model-level associative contributions and cannot be directly interpreted as causal mechanisms (44). Therefore, the SHAP contributions of Zn, ALP, ALB, Cu, and other variables in this study should be interpreted as risk signals identified by the model rather than direct causal evidence for GHT.

This study has several limitations. First, this was a single-center retrospective study for prediction model development and internal validation; therefore, the generalizability of the model to other hospitals and populations remains uncertain. The observed event fraction reflected the outcome distribution of the analytic dataset and should not be interpreted as the population incidence of incident GHT. Second, outcome status was determined from available post-baseline thyroid function records and prenatal follow-up information. Because thyroid function retesting schedules and follow-up intensity were not fully standardized, outcome ascertainment bias may exist.

Third, locally established pregnancy-specific or trimester-specific thyroid function reference intervals were unavailable, which may have introduced potential outcome misclassification. Fourth, although multiple imputation was used to handle missing data, residual bias related to the missing-data mechanism cannot be fully excluded. Fifth, some predictors, particularly trace elements and vitamin-related markers, may not be routinely measured in all prenatal care settings, which may limit direct model implementation in settings with different testing workflows. Finally, SHAP-based interpretation reflects model-derived associations rather than causal relationships.

External prospective validation and, if necessary, local recalibration are required before clinical implementation.

Conclusion

A LightGBM model using clinical laboratory markers showed balanced performance for predicting incident GHT. SHAP analysis identified Zn, ALP, ALB, Cu, vitE, ALT, Fe, Ca, and vitD as the leading contributors to model output. These results suggest that a multidimensional laboratory profile can characterize the risk of incident GHT. External prospective validation is needed before clinical implementation.

Edited by: A. Seval Ozgu-Erdinc, University of Health Sciences Izmir City Hospital, Türkiye

Reviewed by: Yang Fang, Third Affiliated Hospital of Zhengzhou University, China

Hariharan N, Anna University, India

Abbreviations: GHT, gestational hypothyroidism; SHAP, Shapley Additive Explanations; FT3, free triiodothyronine; GW, gestational week; ALB, albumin; ALT, alanine aminotransferase; ALP, alkaline phosphatase; TBA, total bile acid; UREA, urea; GLU, glucose; CG, cholyglycine; AST, aspartate aminotransferase; CREA, creatinine; UA, uric acid; LDH, lactate dehydrogenase; GGT, gamma-glutamyl transferase; LASSO, Least Absolute Shrinkage and Selection Operator; SVM_Kernel, support vector machine with kernel function; LogisticModel, logistic regression model; NeighborMethod, neighbor-based method; PLSModel, partial least squares model; BoostingMethod, boosting method; NeuralNet, neural network model; BayesMethod, Bayesian model; Lasso, Least Absolute Shrinkage and Selection Operator model; AdaptiveBoosting, Adaptive Boosting; LightGBM, Light Gradient Boosting Machine; DCA, decision curve analysis.

Data availability statement

The datasets presented in this article are not readily available because the datasets used and/or analyzed during the current study are not public-ly available due to institutional and patient privacy restrictions, but are available from the corresponding author on reasonable request and subject to institutional approval. Requests to access the datasets should be directed to Mengting Li: 1076302121@qq.com.

Ethics statement

The studies involving humans were approved by the Medical Ethics Committee of Shanxian Central Hospital (approval number: LL2026022). The studies were conducted in accordance with the local legislation and institutional requirements. Written informed consent for participation was not required from the participants or the participants’ legal guardians/next of kin in accordance with the national legislation and institutional requirements.

Author contributions

LS: Data curation, Writing – review & editing, Methodology, Investigation, Writing – original draft. RL: Writing – review & editing, Software, Validation, Writing – original draft, Visualization, Data curation. YZ: Writing – original draft, Project administration, Conceptualization, Supervision, Writing – review & editing. QW: Writing – original draft, Resources, Formal analysis, Software, Validation, Supervision, Writing – review & editing. ZZ: Writing – review & editing, Resources, Writing – original draft, Methodology, Software, Conceptualization. ML: Software, Writing – original draft, Conceptualization, Writing – review & editing, Visualization, Formal analysis, Data curation.

Conflict of interest

The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declared that Generative AI was not used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

Supplementary material

The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fmed.2026.1881157/full#supplementary-material

Supplement file at the original source — open the original paper. This file is not included in this text import.

References

1. Bianco AC Taylor PN . Optimizing the treatment of hypothyroidism. Nat Rev Endocrinol. (2024 ) 20 :379 –80 . 10.1038/s41574-024-00989-7 38684871
2. Aarsland TE Aakre I Stea TH Henjum S Markhus MW Strand TA et al . Association of mild-to-moderate iodine deficiency with thyroid function-a systematic review and meta-analysis. Adv Nutr. (2025 ) 16 :100471 . 10.1016/j.advnut.2025.100471 40633808 PMC12351339
3. Vamja R M Y Patel M Vala V Ramachandran A Surati B et al . Impact of maternal thyroid dysfunction on fetal and maternal outcomes in pregnancy: a prospective cohort study. Clin Diabetes Endocrinol. (2024 ) 10 :50 . 10.1186/s40842-024-00212-6 39695884 PMC11658447
4. Hizkiyahu R Badeghiesh A Baghlaf H Dahan MH . Associations between hypothyroidism and adverse obstetric and neonatal outcomes: a study of a population database including over 184,000 women with hypothyroidism. J Matern Fetal Neonatal Med. (2023 ) 36 :2278027 . 10.1080/14767058.2023.2278027 37935517
5. Osinga JAJ Liu Y Männistö T Vafeiadi M Tao FB Vaidya B et al . Risk factors for thyroid dysfunction in pregnancy: an individual participant data meta-analysis. Thyroid. (2024 ) 34 :646 –58 . 10.1089/thy.2023.0646 38546971 PMC11971561
6. Liu Y Osinga JAJ Maraka S Bliddal S Alexander EK Dosiou C et al . Risk factors for thyroid function test abnormalities during pregnancy: a systematic review of the literature to validate current risk factors and identify novel ones. Thyroid. (2025 ) 35 :553 –75 . 10.1089/thy.2024.0743 40296843 PMC12419152
7. Provinciatto H Moreira MVB Neves GR De Freitas LR Mitsui HC Zhang JMF et al . Levothyroxine for subclinical hypothyroidism during pregnancy: an updated systematic review and meta-analysis of randomized controlled trials. Arch Gynecol Obstet. (2024 ) 309 :2387 –93 . 10.1007/s00404-024-07512-3 38676741
8. Fan L Bu Y Chen S Wang S Zhang W He Y et al . Iodine nutritional status and its associations with thyroid function of pregnant women and neonatal TSH. Front Endocrinol. (2024 ) 15 :1394306 . 10.3389/fendo.2024.1394306 38883600 PMC11176414
9. Su GY Yeh CC Yang SJ Yang CC Hwu CM Wang FF et al . Assessment of iodine nutritional status and gestational thyroid function reference ranges during the first trimester of pregnancy in Taiwan. J Chin Med Assoc. (2024 ) 87 :590 –6 . 10.1097/jcma.0000000000001099 38651854 PMC12718866
10. Parsaei M Dashtkoohi M Amirkhalili E Chashmyazdan M Korevaar TIM Nazeri P . Association of iron status indicators with thyroid hormone concentrations during pregnancy: a systematic review and meta-analysis. Front Endocrinol. (2025 ) 16 :1533169 . 10.3389/fendo.2025.1533169 39944206 PMC11816114
11. Shulhai AM Rotondo R Petraroli M Patianna V Predieri B Iughetti L et al . The Role of nutrition on thyroid function. Nutrients. (2024 ) 16 :2496 . 10.3390/nu16152496 39125376 PMC11314468
12. Zhang W Liang H . Relationships between maternal selected metals (Cu, Mg, Zn and Fe), thyroid function and blood glucose levels during pregnancy. Biol Trace Elem Res. (2023 ) 201 :3603 –12 . 10.1007/s12011-022-03455-5 36418636 PMC10279573
13. Almeida MOP Vilar L Diniz ADS . Vitamin D and thyroid function of pregnant women in a sunny region: is there any connection? Rev Assoc Med Bras. (2025 ) 71 :e20241028 . 10.1590/1806-9282.20241028 40172385 PMC11964327
14. Moradnia M Broberg K Lozano M Chavoshani A Salari M Attar HM et al . Association between urinary heavy metal concentrations, thyroid hormones, and birth outcomes among pregnant women in Isfahan City. Sci Rep. (2025 ) 15 :24264 . 10.1038/s41598-025-10137-4 40624277 PMC12234898
15. Huang K Su S Wang X Hu M Zhao R Gao S et al . Association between maternal thyroid function in early pregnancy and gestational diabetes: a prospective cohort study. J Clin Endocrinol Metab. (2024 ) 109 :e780 –7 . 10.1210/clinem/dgad518 37647889 PMC10795920
16. Li Y Jin N Zhan Q Huang Y Sun A Yin F et al . Machine learning-based risk predictive models for diabetic kidney disease in type 2 diabetes mellitus patients: a systematic review and meta-analysis. Front Endocrinol. (2025 ) 16 :1495306 . 10.3389/fendo.2025.1495306 40099258 PMC11911190
17. Wu Y Yu X Li M Zhu J Yue J Wang Y et al . Risk prediction model based on machine learning for predicting miscarriage among pregnant patients with immune abnormalities. Front Pharmacol. (2024 ) 15 :1366529 . 10.3389/fphar.2024.1366529 38711993 PMC11070771
18. Zhu Z Wei N Guo J Yue C Chen C Zhang Z et al . Predicting the risk of threatened abortion using machine learning methods: a comparative study. BMC Pregnancy Childbirth. (2025 ) 25 :901 . 10.1186/s12884-025-08030-z 40885888 PMC12398114
19. Arain Z Iliodromiti S Slabaugh G David AL Chowdhury TT . Machine learning and disease prediction in obstetrics. Curr Res Physiol. (2023 ) 6 :100099 . 10.1016/j.crphys.2023.100099 37324652 PMC10265477
20. Mennickent D Rodríguez A Opazo MC Riedel CA Castro E Eriz-Salinas A et al . Machine learning applied in maternal and fetal health: a narrative review focused on pregnancy diseases and complications. Front Endocrinol. (2023 ) 14 :1130139 . 10.3389/fendo.2023.1130139 37274341 PMC10235786
21. Cubillos G Monckeberg M Plaza A Morgan M Estevez PA Choolani M et al . Development of machine learning models to predict gestational diabetes risk in the first half of pregnancy. BMC Pregnancy Childbirth. (2023 ) 23 :469 . 10.1186/s12884-023-05766-4 37353749 PMC10288662
22. Alexander EK Pearce EN Brent GA Brown RS Chen H Dosiou C et al . 2017 Guidelines of the American thyroid association for the diagnosis and management of thyroid disease during pregnancy and the postpartum. Thyroid. (2017 ) 27 :315 –89 . 10.1089/thy.2016.0457 28056690
23. Gu S Mo Z Chen Z Li X Jiang Y Liu C et al . Assessment of individual and mixed effects of six minerals on thyroid hormones in Chinese pregnant women. Nutrients. (2024 ) 16 :450 . 10.3390/nu16030450 38337734 PMC10857285
24. Liu S Huang W Lin Y Wang Y Li H Chen X et al . Machine learning-based exploration of the associations between multiple minerals’ intake and thyroid dysfunction: data from the national health and nutrition examination survey. Front Nutr. (2025 ) 12 :1522232 . 10.3389/fnut.2025.1522232 40206957 PMC11978632
25. Uricoechea VH Noguera UK Sierra VH Fernández PM . Zinc and ferritin levels and their associations with functional disorders and/or thyroid autoimmunity: a population-based case-control study. Int J Mol Sci. (2024 ) 25 :10217 . 10.3390/ijms251810217 39337701 PMC11432327
26. Ren M Wang L Wen L Chen J Quan S Shi X . Association between female circulating heavy metal concentration and abortion: a systematic review and meta-analysis. Front Endocrinol. (2023 ) 14 :1216507 . 10.3389/fendo.2023.1216507 37711903 PMC10497972
27. Asghar MY Lassila T Törnquist K . Calcium signaling in the thyroid: friend and foe. Cancers. (2021 ) 13 :1994 . 10.3390/cancers13091994 33919125 PMC8122656
28. Zheng M Wang Y Zou N E J Zou Y . Vitamin D deficiency and pregnancy outcomes: LC-MS/MS-based evaluation in Southwest China. Front Med. (2025 ) 12 :1711506 . 10.3389/fmed.2025.1711506 41657570 PMC12872777
29. Liu S Lu C He L Shan Z Teng W Li Y et al . Vitamin E intake and prevalence rates of thyroid dysfunction and autoimmune thyroiditis: a cross-sectional analysis of NHANES data. Thyroid. (2024 ) 34 :753 –63 . 10.1089/thy.2023.0561 38534308
30. Zhou J Tong J Liang C Sheng J Wu X Gao G et al . The impact of prenatal maternal-fetal metal levels and placental transfer efficiency of metals on neonatal thyroid function: the modulatory role of maternal vitamin D levels in pregnancy. Environ Int. (2026 ) 207 :110017 . 10.1016/j.envint.2025.110017 41496228
31. Pop V Krabbe J Maret W Rayman M . Plasma mineral (selenium, zinc or copper) concentrations in the general pregnant population, adjusted for supplement intake, in relation to thyroid function. Br J Nutr. (2021 ) 125 :71 –8 . 10.1017/s000711452000255x 32660679
32. Mazur M Szymańska M Malik A Szlasa W kalisz PJ . Nutrition and micronutrient interactions in autoimmune thyroid disorders: implications for cardiovascular health. Pathophysiology. (2025 ) 32 :37 . 10.3390/pathophysiology32030037 40843807 PMC12372124
33. Zhang F Hua Q You X Shi F Zhou Y Xu X et al . The association between gestational hypothyroidism in pregnant women with preeclampsia, maternal liver function indicators, and neonatal birth weight: a study in Chinese pregnant women. Front Endocrinol. (2025 ) 16 :1555277 . 10.3389/fendo.2025.1555277 41059232 PMC12498002
34. Chng CL Goh GBB Yen PM . Metabolic and functional cross talk between the thyroid and liver. Thyroid. (2025 ) 35 :607 –23 . 10.1089/thy.2025.0178 40420529
35. Yadav V Barnali DEY Saumya DAS Baruah U Islam H Suman DAS . Automatic computer-aided diagnosis tool for glaucoma detection using U-Net and CNN on retinal fundus images. Innovative Image Processing. (2026 ) 8 :137 –55 . 10.36548/jiip.2026.1.008
36. Dhanka S Kumar A Sharma A Vundavilli H Maini S Rajasekar E . Advances in machine learning and deep learning for hormonal disorder diagnosis: an exhaustive review on pcos, thyroid, and optimization techniques. Arch Computa Methods Eng. (2026 ) 33 :2785 –829 . 10.1007/s11831-025-10380-y
37. Xing J Dong K Liu X Ma J Yuan E Zhang L et al . Enhancing gestational diabetes mellitus risk assessment and treatment through GDM predictor: a machine learning approach. J Endocrinol Invest. (2024 ) 47 :2351 –60 . 10.1007/s40618-024-02328-z 38460091 PMC11369014
38. Collins GS Moons KGM Dhiman P Riley RD Beam AL Calster VB et al . TRIPOD+AI statement: updated guidance for reporting clinical prediction models that use regression or machine learning methods. BMJ. (2024 ) 385 :e078378 . 10.1136/bmj-2023-078378 38626948 PMC11019967
39. Moons KGM Damen JAA Kaul T Hooft L Navarro AC Dhiman P et al . PROBAST+AI: an updated quality, risk of bias, and applicability assessment tool for prediction models using regression or artificial intelligence methods. BMJ. (2025 ) 388 :e082505 . 10.1136/bmj-2024-082505 40127903 PMC11931409
40. Liu C Lin Y Wang L Li H Li Y Yang D et al . Predictive model of sleep disorders in pregnant women using machine learning and SHAP analysis. BMC Pregnancy Childbirth. (2025 ) 25 :994 . 10.1186/s12884-025-08026-9 41034737 PMC12487492
41. Li J Liu X He S Ren Y . Interpretable machine learning for predicting adverse pregnancy outcomes in gestational diabetes: retrospective cohort study. JMIR Med Inform. (2025 ) 13 :e71539 . 10.2196/71539 40958678 PMC12441465
42. Khan W Zaki N Ghenimi N Ahmad A Bian J Masud MM et al . Predicting preterm birth using explainable machine learning in a prospective cohort of nulliparous and multiparous pregnant women. PLoS One. (2023 ) 18 :e0293925 . 10.1371/journal.pone.0293925 38150456 PMC10752564
43. Wang SY Qiao J Wang R Chen HJ Ouyang YQ . Development and external validation of an interpretable machine learning model for predicting perinatal depression in Chinese women during mid- and late pregnancy. Int J Med Inform. (2025 ) 203 :106000 . 10.1016/j.ijmedinf.2025.106000 40523336
44. Metta C Beretta A Pellungrini R Rinzivillo S Giannotti F . Towards transparent healthcare: advancing local explanation methods in explainable artificial intelligence. Bioengineering. (2024 ) 11 :369 . 10.3390/bioengineering11040369 38671790 PMC11048122
Publication and source details

Original title: Development and validation of an interpretable machine learning model for predicting incident gestational hypothyroidism using clinical laboratory markers

Liran Shen; Ru Liu; Yunbiao Zhang; Qingkai Wang; Zhiqiang Zhang; Mengting Li

Frontiers in Medicine · 2026

* Correspondence: Mengting Li, 1076302121@qq.com
†

These authors have contributed equally to this work and share first authorship

Copyright © 2026 Shen, Liu, Zhang, Wang, Zhang and Li.2026Shen, Liu, Zhang, Wang, Zhang and Lihttps://creativecommons.org/licenses/by/4.0/This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.The author(s) declared that financial support was not received for this work and/or its publication.

Repository JATS snapshot; version as supplied

Source retrieved: 2026-11-10T22:11:44.375273+00:00

DOI: 10.3389/fmed.2026.1881157 · PMC13368916