Skip to main content
Frontiers in Cellular and Infection Microbiology logoLink to Frontiers in Cellular and Infection Microbiology
. 2025 Dec 18;15:1718614. doi: 10.3389/fcimb.2025.1718614

Validation and interpretation of machine-learning models for rapid identification of active tuberculosis infection using routine laboratory indicators

Zhan-Zhong Liu 1,, Quan Yuan 1,2,3,, Yu-Dong Zhang 4,, Xue-Di Zhang 1, Jian Liu 5, Jia-Wei Yan 1, Kang-Peng Du 5,*, Hui-Jin Chen 2,*, Liang Wang 3,6,*
PMCID: PMC12756366  PMID: 41488479

Abstract

Introduction

Diagnosis of active Mycobacterium tuberculosis (Mtb) infection relies on clinical symptoms, imaging, and molecular testing, but these methods are often costly and slow. Consequently, there is an urgent need for a rapid and accessible diagnostic approach that can support early detection and reduce ongoing tuberculosis transmission.

Methods

A discovery cohort of 3,829 individuals and an external validation cohort of 405 individuals were included. Six supervised machine learning models were trained using routine laboratory data, and model interpretability was assessed with SHapley Additive exPlanations (SHAP).

Results

Among the six models, XGBoost demonstrated the best diagnostic performance in the internal cohort (accuracy 97.49%; sensitivity 97.56%; specificity 97.42%) and maintained strong performance in the external cohort (accuracy 93.67%; sensitivity 91.56%; specificity 91.13%). SHAP analysis indicated that key predictors reflected characteristic host-response patterns, including inflammation-related hypoalbuminemia, lipid metabolism suppression (HDL-C and LDL-C), altered platelet activity (MPV), and lymphocyte reduction (LYM).

Conclusion

The study presents a high-performing and interpretable machine learning model capable of accurately identifying active Mtb infection using routine blood tests. This low-cost and non-invasive approach has strong potential for application in resource-limited and high-burden settings.

Keywords: biochemical test, blood test, machine learning algorithm, Mycobacterium tuberculosis, predictive model, routine laboratory indicators

Graphical Abstract

Illustration depicting the construction of an optimized XGBoost model. On the left, a study cohort of 3,829 healthy individuals versus active Mtb patients is shown using emoji symbols. Below, images of test tubes labeled as whole blood test and biochemical test. The central section illustrates data input into decision trees labeled Tree 1, Tree 2, and Tree n, with functions f1 to fn-1. The right side features an independent cohort of 405 with accuracy, sensitivity, and specificity percentages given as 93.67%, 91.56%, and 91.13%, respectively.

1. Background

Tuberculosis (TB), caused by Mycobacterium tuberculosis (Mtb), remains a major global health threat, with the World Health Organization (WHO) estimating that there will be approximately 10.6 million new cases and more than 1.6 million deaths worldwide in 2022 (Chakaya et al., 2021; Bagcchi, 2023). Active Mtb infection is the transmissible form of tuberculosis and a major driver of continued spread (Babalola, 2015; Xin et al., 2020). Timely and accurate identification of active Mtb is essential not only for initiating effective treatment but also for interrupting transmission chains and reducing the public health burden (Organization, 2020).

Currently, the diagnosis of active Mtb is based on clinical evaluation, radiographic imaging, and microbiological testing. Conventional methods such as sputum smear microscopy (Desikan, 2013), mycobacterial culture (Azadi et al., 2018), and nucleic acid amplification tests (NAATs), including the Xpert MTB/RIF assay (Kay et al., 2020), have their respective strengths and limitations. Smear microscopy, while widely used, has low sensitivity, particularly in paucibacillary or extrapulmonary TB (Caulfield and Wengenack, 2016). Culture remains the reference standard but requires weeks to yield results (Forbes et al., 2018). Although NAATs provide rapid and sensitive detection, their cost and equipment requirements restrict their use in many low-resource settings (Dinnes et al., 2007). Therefore, there is an urgent need to develop rapid, accurate, and low-cost diagnostic strategies based on existing platform data to improve early detection of active Mtb and reduce ongoing transmission.

In recent years, machine learning (ML) has emerged as a promising approach to extract diagnostic values from high-dimensional clinical data, including routine laboratory indicators (Rabbani et al., 2022; Wan et al., 2025). Routine tests such as complete blood count and biochemical profiles are widely available, inexpensive, and already integrated into standard hospital workflows (Santos-Silva et al., 2024). Multiple studies have demonstrated that ML applied to these indicators can aid disease diagnosis (Kistenev et al., 2022; Liu et al., 2024). For example, Luo et al. developed a gradient boosting model based on routine hematological and biochemical indicators to differentiate active Mtb from latent TB infection (LTBI), achieving high diagnostic performance with sensitivity and specificity exceeding 84% and 91%, respectively, in both internal and external validation cohorts (Luo et al., 2022). Similarly, Dai et al. applied random forest and gradient boosting classifiers to a combination of clinical laboratory indicators to distinguish COVID-19 from community-acquired pneumonia, achieving excellent predictive accuracy (AUROC > 0.85, recall > 0.90), even with a limited number of features (Dai et al., 2021). Therefore, leveraging routine laboratory indicators in combination with machine learning algorithms holds great promise for assisting in the diagnosis of active Mtb infection and other diseases, offering a practical and scalable solution for early disease identification.

In this study, we developed and validated a machine-learning diagnostic model that leverages routinely collected hematological and biochemical laboratory parameters to identify active Mtb infection. To ensure clinical relevance and robustness, we constructed a clinical cohort and systematically compared the performance of multiple machine learning algorithms. Feature importance was subsequently quantified with SHapley Additive exPlanations (SHAP), enabling refined feature selection and enhanced model interpretability. External validation in an independent cohort demonstrated strong generalizability. It highlighted the model’s clinical potential, underscoring that standard laboratory metrics can serve as a powerful adjunctive tool for the diagnosis of active tuberculosis.

2. Materials and methods

2.1. Study design

The present study was conducted at Xuzhou Infectious Diseases Hospital (The 7th Hospital of Xuzhou). Biochemical and hematological data were retrospectively collected from 3,829 in-patients admitted between January 2016 and December 2022, constituting the discovery cohort. An independent validation cohort comprised 405 participants recruited from Guangdong Provincial People’s Hospital (Guangdong Academy of Medical Sciences) affiliated to Southern Medical University, China. Based on clinical and laboratory evaluations, participants were classified into two groups: those with active Mtb patients and healthy controls. The diagnosis of active TB was a positive result for Mtb culture or GeneXpert MTB/RIF assay in designated samples, such as sputum or bronchoalveolar lavage fluid. Healthy controls were required to have no clinical signs or symptoms suggestive of TB, no history of tuberculosis, and negative microbiological results and radiographic imaging. To avoid confounding immune or biochemical alterations, individuals were excluded if they were younger than 18 years of age, had received anti-TB treatment within the past four weeks, or had incomplete clinical or laboratory information. All enrolled participants underwent clinical evaluation to ensure accurate classification. The study was approved by the Medical Ethics Committee of Xuzhou Infectious Disease Hospital (approval number: XCYPJ-2025012001), which was conducted following good clinical practice guidelines. A schematic overview of the study workflow is shown in Figure 1.

Figure 1.

Flowchart detailing a four-step process: 1) Data Preparation involves patient data from Xuzhou Hospital with exclusion criteria and feature extraction. 2) Model Classification includes data splitting, model construction with various algorithms, and evaluation. 3) Model Interpretability uses SHAP for feature importance and model explanation. 4) External Cohort Validation with data from Guangdong Hospital, comparing health and active MTB patients for results evaluation.

Schematic workflow of the study design: 1. data preparation from clinical and biochemical indicators; 2. model construction and internal validation using multiple machine learning algorithms; 3. model interpretation with SHAP analysis; 4. external cohort validation in an independent hospital.

2.2. Routine laboratory tests

Routine laboratory tests were performed using standard procedures for both hematological and biochemical analyses. For hematological tests, ethylenediaminetetraacetic acid (EDTA)-anticoagulated peripheral blood samples were collected, and a complete blood count (CBC) was conducted using the XN-9000 Sysmex analyzer (Sysmex Co., Kobe, Japan) following the manufacturer’s instructions. The parameters assessed included white blood cell count (WBC), red blood cell count (RBC), neutrophil count (NEU), lymphocyte count (LYM), monocyte count (MON), eosinophil count (EOS), basophil count (BAS), red blood cell distribution width coefficient of variation (RDW-CV), standard deviation of red cell distribution width (RDW-SD), mean corpuscular volume (MCV), hematocrit (HCT), hemoglobin (HGB), mean corpuscular hemoglobin (MCH), mean corpuscular hemoglobin concentration (MCHC), platelet count (PLT), Plateletcrit (PCT), mean platelet volume (MPV), platelet distribution width (PDW), platelet larger cell ratio (P-LCR), and platelet large cell count (PLCC). For biochemical analysis, heparin-anticoagulated peripheral blood samples were collected, and the biochemical parameters were measured using the ROCHE COBAS analyzer (Mannheim, Germany) according to the manufacturer’s guidelines. The biochemical markers assessed included total protein (TP), albumin (ALB), globulin (GLOB), total bilirubin (TBIL), direct bilirubin (DBIL), indirect bilirubin (IBIL), creatinine (CREA), uric acid (UA), glucose (GLU), total cholesterol (CHOL), triglycerides (TG), high-density lipoprotein cholesterol (HDL-C), and low-density lipoprotein cholesterol (LDL-C). All analytical procedures were performed under strict quality control measures to ensure the reliability and accuracy of the results. To prepare laboratory indicators for model development, standard preprocessing steps were applied. These included data cleaning, removal of samples with missing or incomplete laboratory information, and harmonization of variable formats across cohorts. A correlation analysis of all laboratory variables was conducted, and highly collinear features with redundant biological information were removed.

2.3. Construction of machine learning models

To obtain an effective identification model for diagnosing active Mtb patients and healthy individuals, we compared the performance of six ensemble learning algorithms: Adaptive Boosting (AdaBoost), Bootstrap Aggregating (Bagging), Categorical Boosting (CatBoost), Random Forest (RF), Support Vector Machine (SVM), and eXtreme Gradient Boosting (XGBoost), implemented with the Scikit-Learn package (version 0.21.3). The dataset was preprocessed using the LabelEncoder function and the to_categorical method from Scikit-Learn to convert example labels into label-encoded forms. We divided the dataset into 70% for the training cohort and 30% for the validation cohort (internal validation). The training cohort was used for model training and hyperparameter optimization, while the validation cohort was used to assess the model’s performance on unseen data (Xu and Goodacre, 2018). This division ensures that the models are validated on different datasets, reducing the risk of overfitting and enhancing the generalizability of the models (Kernbach and Staartjes, 2021). To further validate the generalizability and robustness of the established models, the models were subsequently evaluated on an independent cohort. During the training of the six machine learning models, we employed the GridSearchCV function to train and optimize the hyperparameter combination. This procedure aimed to identify the best-fitting parameters for each model.

2.4. Model validation and interpretation

To evaluate the diagnostic performance of machine learning models in distinguishing between active Mtb patients and healthy individuals, quantitative metrics were employed to assess the performance of the machine learning models. Common evaluation metrics such as accuracy, precision, recall, and F1-score were used to evaluate the generalization ability of these models (Yacouby and Axman, 2020). To mitigate the overfitting risk during model training, we implemented 5-fold CV by setting cv = 5 in the cross_val_score function, which partitioned the training dataset into five equally sized subsets for iterative validation (Yadav and Shukla, 2016). Additionally, the area under the curve (AUC) value, derived using the roc_auc_score function, was incorporated as a performance metric to account for potential class imbalance (Marzban, 2004). 95% confidence intervals (CIs) for AUC were further estimated by bootstrap with 1,000 resamples of the test set, and the percentile method was used to derive the 95% CIs. To visually represent the predictive performance of the best-performing model on the test dataset, we generated a confusion matrix using the confusion_matrix function, which displayed the results in a 2*2 matrix format corresponding to the binary classification task (Markoulidakis and Markoulidakis, 2024). Model calibration was evaluated by plotting calibration curves and calculating the Brier score using the calibration_curve and brier_score_loss functions, respectively. Additionally, due to the challenge of correctly interpreting machine learning models, we introduced the SHAP method to rank and visualize the importance of laboratory indicators (Li, 2022). Specifically, shap.TreeExplainer was invoked to load the generated model file and the test data. Then, explainer.shap_values were computed for features of each sample. The resulting SHAP values were input into shap.summary_plot to reflect feature importance and the contribution of each feature to positive and negative predictions for the samples.

2.5. External cohort validation

An independent external validation cohort was collected from patients at Guangdong Provincial People’s Hospital (Guangdong Academy of Medical Sciences), China, with inclusion and exclusion criteria consistent with those applied to the discovery cohort. The external validation cohort was used as input for the optimal model, and the same evaluation metrics as the derivation cohorts were used to measure the performance of the model on unknown data. As the purpose of external validation was to assess out-of-sample predictive performance rather than optimize hyperparameters, five-fold cross-validation was not performed on the validation cohort.

2.6. Statistical analysis

Descriptive statistics were used to summarize demographic and clinical characteristics of study participants. Continuous variables were presented as medians with ranges, and categorical variables were expressed as counts and percentages. Comparisons between different groups were performed using the Mann-Whitney U test for continuous variables, and the Chi-square test was applied to categorical variables. P < 0.05 was considered statistically significant. All statistical analyses were conducted using GraphPad Prism (version 9.3.0) and R programming language (version 4.3.2).

3. Results

3.1. Characteristics of study participants

A total of 4,234 participants were enrolled in this study, comprising 3829 individuals from Xuzhou Infectious Diseases Hospital (The 7th Hospital of Xuzhou) for model development (the discovery cohort) and 405 individuals from Guangdong Provincial People’s Hospital for external validation. In the discovery cohort, 1,967 patients were diagnosed with active Mtb infection, and 1,862 were healthy individuals. The validation cohort consisted of 205 active Mtb cases and 200 healthy controls. A comparison of baseline demographic characteristics between the active Mtb and healthy groups is presented in Table 1. No significant differences in age or sex distribution were observed between the active Mtb and healthy groups in either the discovery cohort or the validation cohort.

Table 1.

Basic information form of participants in the health group and active Mtb patients, including age and gender.

Cohorts Discovery cohort Validation cohort
Health (n = 1862) Active Mtb (n = 1967) Health (n = 200) Active Mtb (n = 205)
Median age, year
(range)
53
(18-69)
48
(18-98)
49
(18-66)
46
(18-85)
P-value 0.247 0.412
Sex, male,% 1239 (66.54%) 1323 (67.25%) 117 (58.50%) 131 (63.90%)
P-value 0.662 0.311

3.2. Performance of routine laboratory indicators in discriminating active Mtb patients from healthy population

To evaluate the discriminatory power of routine hematological and biochemical indicators between active Mtb patients and healthy individuals, comparative analysis and ROC curve assessments were conducted across all variables. As shown in Table 2, multiple hematological indicators exhibited statistically significant differences between the two groups. Notably, active Mtb patients had significantly lower values of RBC, LYM, HCT, HGB, RDW-SD, MPV, and P-LCR (P < 0.05), suggesting altered erythrocyte and platelet parameters associated with TB pathology (Iqbal et al., 2015). Conversely, NEU levels were significantly elevated in the active Mtb group (P < 0.05), aligning with studies demonstrating neutrophil-driven inflammation in TB (Kerkhoff et al., 2013). Among biochemical indicators, ALB, TP, CHOL, HDL-C, LDL-C, and GLOB were significantly lower or altered in active Mtb patients compared to healthy individuals (P < 0.05), reflecting systemic inflammatory and nutritional disturbances (Chidambaram et al., 2021). ALT, TBIL, DBIL, CREA, and UA levels showed no significant differences (P > 0.05), indicating limited diagnostic value for TB differentiation.

Table 2.

Comparison of hematological and biochemical parameters between active Mtb patients and healthy individuals.

Indicators Health(n=1862) Active Mtb(n=1967) P-value
Complete blood count,
median (range)
WBC (×109/L) 6.14 (2.69, 22.26) 5.80 (1.40, 23.37) 0.878
RBC (×10¹²/L) 4.64 (2.70, 6.70) 4.36 (1.67, 6.48) 0.000*
NEU (×109/L) 3.42 (1.03, 19.52) 3.83 (1.65, 20.23) 0.002*
LYM (×109/L) 2.05 (0.72, 5.46) 1.36 (0.07, 4.51) 0.000*
MON (×109/L) 0.35 (0.08, 3.17) 0.38 (0.01, 2.63) 0.174
EOS (×109/L) 0.11 (0.00, 1.09) 0.10 (0.00, 3.78) 0.289
BAS (×109/L) 0.01 (0.00, 0.14) 0.02 (0.00, 0.92) 0.208
RDW-CV (%) 13.10 (10.50, 20.70) 13.00 (10.50, 22.80) 0.785
RDW-SD (fL) 45.90 (34.10, 90.90) 41.80 (28.90, 82.50) 0.000*
MCV (fL) 90.90 (59.90, 122.40) 89.30 (48.50, 119.20) 0.000*
HCT (%) 42.60 (26.20, 76.70) 38.40 (15.70, 58.70) 0.000*
HGB (g/L) 136.00 (74.00, 191.00) 128.00 (44.00, 195.00) 0.000*
MCH (pg) 29.50 (15.00, 48.10) 29.70 (17.10, 39.20) 0.946
MCHC (g/L) 330.00 (196.00, 445.00) 332.00 (234.00, 398.00) 0.019*
PLT (×109/L) 231.00 (47.00, 623.00) 236.00 (23.00, 1078.00) 0.054
PCT (%) 0.24 (196.00, 445.00) 332.00 (234.00, 398.00) 0.000*
MPV(fL) 10.30 (7.60, 17.40) 8.30 (5.40, 15.10) 0.000*
PDW (%) 16.30 (11.00, 35.3) 15.70 (14.40, 17.60) 0.000*
P-LCR (%) 23.20 (6.60, 93.60) 18.20 (2.00, 84.00) 0.010*
Biochemical indicators,
median (range)
ALT (U/L) 17.00 (1.00, 400.00) 15.00 (2.00, 765.00) 0.268
AST (U/L) 19.00 (2.00, 217.00) 21.00 (6.00, 887.00) 0.014*
TP (g/L) 73.48 (43.28, 101.80) 69.40 (30.50, 85.20) 0.000*
ALB (g/L) 45.99 (22.80, 56.80) 38.65 (0.80, 52.90) 0.000*
GLOB (g/L) 27.47 (11.70, 52.70) 30.80 (14.90, 63.50) 0.000*
TBIL (μmol/L) 11.62 (2.57, 353.60) 9.10 (1.80, 460.00) 0.521
DBIL (μmol/L) 3.40 (0.00, 284.80) 3.10 (0.00, 294.30) 0.432
IBIL (μmol/L) 8.26 (0.78, 85.80) 5.85 (0.00, 165.70) 0.008*
CREA (μmol/L) 66.00 (30.00, 539.00) 61.10 (14.80, 838.40) 0.323
UA (μmol/L) 309.00 (72.00, 1168.60) 283.35 (11.30, 1103.80) 0.303
GLU (mmol/L) 5.18 (3.43, 23.67) 4.95 (0.02, 29.71) 0.661
CHOL (mmol/L) 4.77 (1.87, 11.53) 3.84 (0.64, 11.70) 0.000*
TG (mmol/L) 1.01 (0.24, 18.32) 0.90 (0.01, 10.51) 0.010*
HDL-C (mmol/L) 1.31 (0.59, 3.40) 0.93 (0.01, 2.82) 0.000*
LDL-C (mmol/L) 3.07 (0.68, 6.55) 2.09 (0.22, 9.04) 0.000*

*footnote: bold values indicate statistical significance.

To further quantify the diagnostic capacity of these indicators, ROC curve analysis was performed (Figure 2A), and the AUC for each marker was calculated and ranked (Figure 2B). The top-performing indicators were ALB, MPV, HDL-C, LDL-C, and LYM, each achieving an AUC greater than 0.8, indicating strong individual predictive power in differentiating active Mtb from healthy controls.

Figure 2.

Panel A shows a multi-colored ROC curve plot with various lines representing different indicators, measuring sensitivity versus 1-specificity. Panel B displays a horizontal bar chart ranking the same indicators by their AUC values, with a gradient color from blue to red indicating increasing AUC values.

Performance of individual indicators from routine laboratory tests in differentiating active MTB patients from healthy individuals. (A) ROC curves showing the diagnostic performance of individual indicators from routine laboratory tests in discriminating between active Mtb and healthy individuals. (B) Cleveland dot plot showing the AUC of various indicators in discriminating active MTB patients from healthy individuals.

3.3. Machine learning model comparison and external validation

To evaluate the feasibility of integrating multiple routine laboratory indicators for the classification of active Mtb infection, dimensionality reduction and correlation analysis were first performed to investigate the underlying structure and relationships among the selected features. As shown in Figure 3A, the result of t-SNE demonstrates a clear separation between active Mtb patients and healthy individuals based on the full set of hematological and biochemical features. Despite some degree of overlap at the boundary regions, the clustering pattern indicates that the combined feature space can effectively differentiate the two groups in a non-linear, high-dimensional context. Furthermore, Pearson Correlation Analysis among laboratory indicators in the active Mtb group identified distinct patterns of association (Figure 3B). For instance, NEU exhibited a strong positive correlation with WBC, reflecting coordinated elevation in systemic inflammation (Hu et al., 2014). Similarly, PLT exhibited a high correlation with PCT, indicating reactive thrombocytosis potentially induced by systemic inflammation (Peng et al., 2017). In contrast, RDW-SD was negatively correlated with HGB and HCT, suggesting that worsening anisocytosis may be associated with anemia of chronic disease in active Mtb (Ashenafi et al., 2022). These complex multivariate interactions highlight the limitations of traditional univariate approaches and underscore the necessity of machine learning models, which can capture non-linear relationships and automatically adjust feature weights to optimize classification performance.

Figure 3.

Panel A shows a t-SNE plot with blue and orange dots representing health and active Mtb conditions, respectively, with overlapping areas. Panel B displays a correlation matrix using a color gradient from blue to red, indicating the strength of correlations among various medical parameters.

Application of routine laboratory indicators in differentiating active MTB patients from healthy individuals. (A) t-SNE plot illustrating the two-dimensional distribution of routine laboratory indicators. (B) The correlation plot shows the correlations among the various indicators in the active Mtb group.

To further assess the diagnostic utility of routine laboratory indicators in distinguishing active Mtb infection, we constructed and evaluated six supervised machine learning models, including AdaBoost, Bagging, CatBoost, RF, SVM, and XGBoost. Their performance was assessed using multiple evaluation metrics, including accuracy, precision, sensitivity (recall), F1-score, and 5-fold cross-validation (Table 3). Among all models, XGBoost achieved the best overall performance, with an accuracy of 97.49%. These results indicate that XGBoost not only correctly identifies a high proportion of active Mtb cases (sensitivity), but also maintains strong ability to exclude healthy individuals (specificity), making it a balanced and reliable classifier. Its robustness was further confirmed by the highest 5-fold cross-validation accuracy (97.20%), suggesting minimal overfitting. The superior performance of XGBoost may be attributed to its ability to capture complex nonlinear relationships and interactions among routine laboratory features through gradient boosting and regularization (Dong et al., 2022). It provides built-in methods for estimating feature importance, which facilitates model interpretability and can help identify key clinical variables in complex, high-dimensional datasets (Takefuji). The SVM model performed comparably well, yielding a balanced accuracy of 97.15%, and also demonstrated strong generalization capability. Bagging and CatBoost followed closely, with accuracy ranging from 95.86% to 96.26%, indicating solid but slightly less consistent performance across metrics. In contrast, RF exhibited the lowest predictive performance among the ensemble models, with an overall accuracy of 94.14%. Due to its superior performance in the internal evaluation, the XGBoost model was selected for external validation using an independent cohort from Guangdong Provincial People’s Hospital. In this validation set, the model maintained strong predictive ability, achieving an accuracy of 93.67%, a sensitivity of 91.56%, and a specificity of 91.13%.

Table 3.

Performance comparison of six supervised machine learning algorithms for prediction of routine indicators in active Mtb infection diagnosis.

Algorithm Accuracy Prediction Sensitivity Specificity F1-score 5Fold-CV
XGBoost 97.49% 97.49% 97.56% 97.32% 97.52% 97.20%
SVM 97.15% 97.15% 97.06% 97.08% 97.10% 96.89%
Bagging 96.26% 96.26% 96.26% 96.13% 96.26% 95.87%
CatBoost 95.86% 95.86% 95.86% 95.65% 95.86% 95.28%
AdaBoost 94.46% 94.46% 94.49% 94.26% 94.47% 94.35%
RF 92.24% 92.24% 92.13% 92.18% 92.18% 92.04%
External cohorts (XGBoost)
GDPH* 93.67% 93.67% 91.56% 91.13% 92.60% N/A

*GDPH, Guangdong Provincial People’s Hospital.

In addition, we conducted subgroup analyses based on sex and age in the external validation cohort. For the sex-based subgroups, the XGBoost model showed comparable performance in both male and female groups, with accuracy values of 94.35% and 93.23%, respectively. Both groups exhibited high sensitivity and specificity, indicating the model’s consistent performance across gender. For age-based subgroups, the model also demonstrated strong performance. In the 18–40 group, the accuracy was 93.77%, while in the 40–60 group, it was slightly higher at 93.86%. For the ≥60 age group, the accuracy decreased to 91.55%, but the model still maintained a strong performance in this subgroup with sensitivity and specificity remaining relatively high (Supplementary Table S1). These findings underscore the model’s ability to generalize across different clinical settings, patient demographics, and laboratory conditions.

3.4. Model validation and interpretation

To further verify the diagnostic utility of the XGBoost model and enhance its clinical interpretability, we performed a comprehensive evaluation of its classification performance and feature attribution behavior. As shown in Figure 4A, the confusion matrix revealed that the XGBoost model achieved high classification accuracy in distinguishing active Mtb patients from healthy individuals. The true positive rate (correctly identified Mtb cases) was 98.02%, and the true negative rate (correctly identified healthy individuals) was 97.65%, indicating excellent discrimination capability. ROC curves were used to compare the diagnostic performance of all machine learning models (Figure 4B). The AUC of the XGBoost model reached 0.9825 (95% CI 0.9769–0.9875), the highest among all models evaluated. In addition to discriminati on performance, we also assessed the calibration of the XGBoost model to evaluate the agreement between predicted probabilities and actual event rates (Supplementary Figure S1). The calibration curve showed generally good agreement between predicted probabilities and observed event rates, with a Brier score of 0.047, indicating acceptable overall calibration, although some fluctuations were seen in intermediate risk groups. Together, these results confirm that the XGBoost model exhibits both strong discriminatory power and reliable probability estimation, supporting its potential applicability in clinical decision-making.

Figure 4.

(A) Confusion matrix for XGBoost model showing Health and MTB classifications. Health: 98.55% true positive, 1.45% false positive. MTB: 99.02% true positive, 0.88% false negative. (B) ROC curve comparing XGBoost, SVM, Bagging, CatBoost, AdaBoost, and RF models, with AUC scores. (C) Bar chart showing features ranked by average SHAP values. Top features: PLCC, MPV, ALB, LDL-C, HDL-C. (D) SHAP summary plot displaying feature importance and impact for PLCC, MPV, ALB, LDL-C, and others, with color gradient indicating feature values from low (blue) to high (red).

Diagnostic performance and feature importance analysis of the machine learning models. (A) Confusion matrix for the XGBoost model in discriminating between active MTB and healthy individuals. (B) ROC curves comparing the diagnostic performance of various machine learning models. (C) Mean SHAP values showing the importance of individual features in the XGBoost model. (D) SHAP summary plot illustrating the impact of individual features on the XGBoost model’s output.

To enhance model interpretability and facilitate clinical understanding of the key drivers of prediction, we employed SHAP to quantify feature contributions at both global and individual levels (Prendin et al., 2023). The mean SHAP value (Figures 4C, D) further illustrates the contribution and directionality of individual features, offering refined interpretability at both global and instance levels (Supplementary Table S2). Among the top-ranked features, ALB demonstrated the strongest negative association with the model’s prediction of active Mtb infection. Specifically, lower ALB values contributed markedly to positive model outputs (i.e., classification as active Mtb), consistent with the well-established role of hypoalbuminemia as a biomarker of systemic inflammation, malnutrition, and disease severity in TB.

MPV was also identified as a major contributor. Lower MPV values were strongly associated with the active Mtb class, reflecting possible platelet consumption and microvascular activation commonly observed during chronic infectious processes (Korniluk et al., 2019). Both LDL-C and HDL-C exhibited strong negative SHAP contributions, where reduced levels were linked to increased model probability of active Mtb. These findings are in line with reports of lipid metabolism remodeling during active Mtb infection, possibly reflecting host-pathogen competition for lipid substrates and altered hepatic synthesis under inflammatory stress (Akpovi et al., 2013). Other hematological features, including RDW-SD and MCH, showed meaningful contributions as well. Anemia and malnutrition are common comorbidities in patients with active Mtb, often resulting from chronic inflammation, reduced dietary intake, and impaired nutrient absorption (Chhabra et al., 2021). In this context, elevated RDW-SD values in active Mtb patients may reflect increased variability in red blood cell size, associated with nutritional deficiencies such as iron, folate, or vitamin (Garg).

Notably, LYM and PCT also contributed to the model’s decision boundary, albeit to a lesser extent. Lymphopenia is frequently observed in advanced or disseminated TB and may indicate underlying immune dysregulation (Luo et al., 2021). PCT, reflecting total platelet mass, may complement MPV in capturing platelet activation and production dynamics in response to infection. Together, the SHAP interpretability framework confirms that the XGBoost model not only achieves high predictive performance but also relies on clinically relevant features with mechanistic plausibility. This enhances the model’s credibility and potential for translation into practical diagnostic workflows.

4. Discussion

TB remains one of the most prevalent and deadly infectious diseases worldwide, particularly affecting low- and middle-income countries (Mohajan, 2014). With an estimated 10 million new cases each year, TB continues to impose a heavy burden on global health, particularly affecting vulnerable groups such as those living with HIV/AIDS, the malnourished or those with limited access to healthcare (Kwan and Ernst, 2011; Foo et al., 2022). Rapid and accurate identification of active Mtb infection is essential for curbing transmission, initiating timely treatment, and improving clinical outcomes. Conventional diagnostic methods, such as sputum smear microscopy, mycobacterial culture, and chest radiography, are often limited by low sensitivity, prolonged turnaround time, or poor specificity (Ryu, 2015). These techniques are often time-consuming, technically demanding, or cost-prohibitive, especially in resource-limited settings, which limits their widespread implementation and delays diagnosis and treatment (Parsons et al., 2011). Therefore, there is an urgent need to develop alternative diagnostic approaches that are accurate, low-cost, minimally invasive, and amenable to broad implementation across diverse clinical environments.

In recent years, increasing evidence has highlighted the potential of combining routine laboratory indicators with ML algorithms to enhance diagnostic performance for various diseases (Tang et al., 2021). Numerous studies have demonstrated the practical utility of hematological and biochemical features within data-driven diagnostic frameworks (Silva, 2024; Yang et al., 2024). For instance, Alves et al. (2021) applied a random forest model to routine blood test data for COVID-19 screening, achieving an AUC of 0.86 and demonstrating good overall accuracy and interpretability using decision tree–based explanation tools. Similarly, Xu et al. (2025) developed a gradient boosting model combining tumor markers and routine blood indices to detect colorectal cancer, achieving an AUC above 0.90 in both internal and external validation cohorts. These studies highlight the scalability, accessibility, and clinical relevance of combining widely available blood data with machine learning techniques, especially in low-resource settings that lack advanced diagnostic infrastructure.

In this context, we developed a diagnostic framework that combines routine hematological and biochemical indicators from peripheral venous blood with supervised machine learning algorithms to identify active Mtb. To fully exploit the diagnostic potential of these routine blood indicators, we employed a multi-step analytical pipeline. Initially, univariate statistical comparisons and ROC curve analyses were performed to evaluate the discriminative power of individual features. The AUC values for several metrics including ALB, MPV, HDL-C, LDL-C, and LYM were all greater than 0.80, underscoring their potential as candidate biomarkers of active Mtb disease. To further assess group separation in high-dimensional space, we utilized t-SNE, which revealed clear clustering between TB cases and healthy controls.

Based on these findings, we constructed and evaluated six supervised machine learning models. Among them, the XGBoost algorithm demonstrated the most robust and reliable performance, achieving an accuracy of 97.49%, a sensitivity of 97.56%, and a specificity of 97.42% in the internal cohort. External validation using an independent dataset further confirmed its strong generalizability, with an accuracy of 93.67%. Several methodological characteristics likely contributed to the superior performance of XGBoost. As a gradient boosting framework, XGBoost effectively captures the complex, non-linear, and high-order interactions among hematological and biochemical features that characterize active tuberculosis. In addition, the incorporation of both L1 and L2 regularization within its objective function reduces overfitting and ensures stable learning from high-dimensional and heterogeneous clinical data. Its inherent robustness to missing values and measurement variability further enhances its suitability for real-world laboratory datasets. Compared to traditional diagnostic methods, this data-driven framework presents a cost-effective and scalable that integrates computational efficiency with clinical accessibility. Beyond high predictive accuracy, an important advantage of the XGBoost model is that its SHAP-derived feature contributions align closely with the known pathophysiology of active Mtb infection, thereby reinforcing the biological plausibility of our findings. ALB emerged as the strongest predictor, a result consistent with the profound systemic inflammation and catabolic state characteristic of tuberculosis; pro-inflammatory cytokines suppress hepatic albumin synthesis, while chronic infection increases metabolic consumption, jointly leading to hypoalbuminemia (Fayed et al., 2018). Platelet-related indices such as MPV and PCT were also highly influential, reflecting inflammation-driven platelet activation, consumption, and a shift toward smaller platelet populations (Verma et al., 2025). Additionally, reductions in HDL-C and LDL-C likely reflect Mtb-induced remodeling of host lipid metabolism, as the pathogen relies heavily on host lipids for persistence, while inflammatory signaling further suppresses hepatic lipoprotein synthesis (Baluku et al., 2024). Hematologic markers including RDW-SD, MCH, and LYM also contributed meaningfully to model predictions. Elevated RDW-SD indicates impaired erythropoiesis and increased erythrocyte size variability, common consequences of chronic inflammation, nutritional deficiencies, and anemia associated with tuberculosis, while lymphopenia reflects T cell depletion, apoptosis, or peripheral redistribution, all of which are associated with disease severity and bacterial burden (Selvavinayagam et al., 2024). These associations support the biological plausibility and clinical relevance of our model’s predictions.

Furthermore, evidence synthesized by Zorina et al. indicates that persistent viral and bacterial infections can trigger long-term systemic inflammation, sustained cytokine release, oxidative stress, and metabolic dysregulation (Zorina et al., 2023). All these effects may extend beyond the primary site of infection and lead to neuroinflammation and tissue degeneration. These mechanisms are highly relevant to the host responses observed in active Mtb infection. The chronic inflammatory environment unique to tuberculosis aligns with prolonged immune activation, where cytokine network dysregulation, immune cell exhaustion, and metabolic reprogramming shape systemic physiological changes. Such processes provide additional context for the SHAP-identified predictors in our model, including hypoalbuminemia, dyslipidemia, altered platelet indices, and lymphopenia, which reflect not only TB-specific immune responses but also fundamental host-pathogen interaction patterns shared across chronic infectious diseases.

Beyond diagnostic performance and biological interpretability, the practical implementation of this model in real-world clinical workflows is an important consideration. The XGBoost model requires relatively modest computational resources once trained, and the prediction process can be executed on standard hospital computers or server environments without the need for dedicated hardware. This allows the model to be embedded into existing laboratory workflows with minimal technical burden. The structure of the input data, which consists of routine hematological and biochemical indicators, is already compatible with laboratory information systems used in most clinical settings. The model can therefore be integrated into these systems through automated data extraction and real-time result generation, enabling seamless support for diagnostic decision making. All data used in this study were fully anonymized, and any clinical deployment would comply with institutional and national data protection regulations, with safeguards such as secure data transmission and controlled access. With these requirements met, the model could serve as a practical and low-cost decision support tool that facilitates early identification of active Mtb infection, particularly in high-burden or resource-limited settings.

Despite the promising results, this study has several limitations. First, although external validation was performed, the independent cohort was drawn from a single center, which may limit generalizability. We further acknowledge that hospital-based controls may not fully represent individuals encountered in community-wide screening programs, and this mismatch may introduce a degree of spectrum bias. Hospital-attending populations often differ from community individuals in terms of comorbidities, healthcare-seeking behaviors, and baseline laboratory characteristics, whereas community participants may be asymptomatic or present with subclinical disease. While such bias cannot be entirely avoided in retrospective hospital-based studies, the inclusion of an external validation cohort helps partially mitigate this concern by assessing model performance in a population distinct from the derivation set. Potential confounding factors, including comorbidities, concurrent medications, and nutritional status, may also influence routine laboratory indicators independent of tuberculosis. Although strict inclusion criteria were applied to minimize these effects, residual confounding remains possible due to incomplete information on these variables in retrospective datasets. Future prospective studies with comprehensive clinical documentation and community-based sampling, particularly those including individuals with latent or subclinical tuberculosis, will be essential for more rigorous assessment of model robustness across diverse populations. Second, our model relied solely on routine laboratory parameters. Incorporating other clinical data, such as symptoms, imaging findings, or comorbidities, can further enrich the feature space and enhance the robustness of the diagnosis. These approaches integrate transcriptomic, proteomic, and epigenomic information within spatial contexts, offering a deeper understanding of how microenvironmental cues shape disease initiation and progression. As spatial and multimodal omics technologies continue to mature, future studies that combine routine laboratory indicators with spatial or multi-omic data may further enhance the mechanistic interpretability and biological relevance of tuberculosis prediction models.

In conclusion, our findings demonstrate that routine blood-derived indicators, when integrated with interpretable machine learning models, can accurately and reliably identify active Mtb. Routine hematological and biochemical tests are inexpensive, widely available, and rapidly obtained in most healthcare settings, including primary care facilities. Owing to these advantages, the proposed model could serve as an initial risk stratification tool to identify individuals who would benefit most from confirmatory testing. Patients predicted to be at higher risk could be prioritized for GeneXpert testing, radiographic evaluation, or microbiological assays, which would improve diagnostic efficiency and reduce unnecessary use of more resource-intensive procedures. In settings with limited access to advanced diagnostics, the model may also function as a preliminary screening tool to support clinical decision making. This complementary, stepwise approach aligns well with real-world clinical workflows and has the potential to enhance early detection, reduce diagnostic delays, and optimize resource allocation. Together, these strengths indicate that this approach offers a practical, scalable, and cost-effective diagnostic aid that supports tuberculosis control efforts, particularly in high-burden and resource-constrained environments.

Funding Statement

The author(s) declared that financial support was received for this work and/or its publication. This study was financially supported by the Research Foundation for Advanced Talents of Guangdong Provincial People’s Hospital (Grant No. KY012023293, Recipient: LW), the High-End Foreign Expert Recruitment Program (Grant No. H20240714, Recipient: LW), the Special Fund for Promoting Technological Innovation in Xuzhou City (Key R&D Program for Social Development and the “Dual Carbon” Special Program for Social Development Demonstration) Project (Grant No. KC23206, Recipient: Z-ZL), the Hospital-Level Scientific Research Project of the 7th Hospital of Xuzhou (Grant No. DTXZ202501, Recipient: Z-ZL), and the Shandong Province Medical and Health Science and Technology Development Plan Project (Grant No. 202511001320, Recipient: H-JC). The funders had no role in the study design, data collection, data analysis, result interpretation, or manuscript writing.

Footnotes

Edited by: Ying Luo, University of Texas Southwestern Medical Center, United States

Reviewed by: Elena Niculet, Dunarea de Jos University, Romania

Fu Gao, Yale University, United States

Panpan Gu, Fudan University, China

Data availability statement

The dataset will be available upon request. Requests to access these datasets should be directed to Liang Wang, healthscience@foxmail.com.

Ethics statement

The studies involving humans were approved by Ethics Committee of Xuzhou Infectious Diseases Hospital. The studies were conducted in accordance with the local legislation and institutional requirements. The ethics committee/institutional review board waived the requirement of written informed consent for participation from the participants or the participants’ legal guardians/next of kin because this was a retrospective analysis of routine laboratory test results after data desensitization. It is unable to identify patients based on data.

Author contributions

Z-ZL: Data curation, Formal analysis, Funding acquisition, Investigation, Resources, Writing – original draft, Writing – review & editing. QY: Data curation, Formal analysis, Investigation, Methodology, Validation, Visualization, Writing – original draft, Writing – review & editing. Y-DZ: Investigation, Validation, Writing – original draft, Writing – review & editing. X-DZ: Data curation, Investigation, Validation, Writing – original draft, Writing – review & editing. JL: Data curation, Investigation, Validation, Writing – original draft, Writing – review & editing. J-WY: Data curation, Investigation, Validation, Writing – original draft, Writing – review & editing. K-PD: Conceptualization, Project administration, Resources, Writing – original draft, Writing – review & editing. H-JC: Conceptualization, Investigation, Project administration, Resources, Supervision, Writing – original draft, Writing – review & editing. LW: Conceptualization, Funding acquisition, Investigation, Project administration, Resources, Supervision, Validation, Writing – original draft, Writing – review & editing.

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.

The author LW declared that they were an editorial board member of Frontiers, at the time of submission. This had no impact on the peer review process and the final decision.

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/fcimb.2025.1718614/full#supplementary-material

Table1.docx (570.9KB, docx)
Table2.docx (13.7KB, docx)
Table3.docx (16.7KB, docx)

References

  1. Akpovi D. C., Gbaguidi L. H. S., Anago E., Affolabi D., Dougnon T.G., Faihun F., et al. (2013). Tuberculosis treatment raises total cholesterol level and restores high density lipoprotein cholesterol (HDLC) in patients with pulmonary tuberculosis. Afr. J. Biotechnol. 12, 1–6. [Google Scholar]
  2. Alves M. A., Castro G. Z., Oliveira B. A. S., Ferreira L.A., Ramírez J.A., Silva R.C., et al. (2021). Explaining machine learning based diagnosis of COVID-19 from routine blood tests with decision trees and criteria graphs. Comput. Biol. Med. 132, 104335. doi:  10.1016/j.compbiomed.2021.104335, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Ashenafi S., Bekele A., Aseffa G., Amogne W., Kassa E., Aderaye G., et al. (2022). Anemia is a strong predictor of wasting, disease severity, and progression, in clinical tuberculosis (TB). Nutrients 14, 3318. doi:  10.3390/nu14163318, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Azadi D., Motallebirad T., Ghaffari K., Shojaei H.. (2018). Mycobacteriosis and tuberculosis: laboratory diagnosis. Open Microbiol. J. 12, 41. doi:  10.2174/1874285801812010041, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  5. Babalola M. O. (2015). The strengths, weaknesses, opportunities and threats (SWOT) analysis of Mycobacterium tuberculosis: a systematic review. J. Tuberculosis Res. 3, 184–205. doi:  10.4236/jtr.2015.34025 [DOI] [Google Scholar]
  6. Bagcchi S. (2023). WHO’s global tuberculosis report 2022. Lancet Microbe 4, e20. doi:  10.1016/S2666-5247(22)00359-7, PMID: [DOI] [PubMed] [Google Scholar]
  7. Baluku J. B., Nalwanga R., Kazibwe A., Olum R., Nuwagira E., Mugenyi N., et al. (2024). Association between biomarkers of inflammation and dyslipidemia in drug resistant tuberculosis in Uganda. Lipids Health Dis. 23, 65. doi:  10.1186/s12944-024-02063-7, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  8. Caulfield A. J., Wengenack N. L. (2016). Diagnosis of active tuberculosis disease: From microscopy to molecular techniques. J. Clin. Tuberculosis Other Mycobacterial Dis. 4, 33–43. doi:  10.1016/j.jctube.2016.05.005, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  9. Chakaya J., Khan M., Ntoumi F., Aklillu E., Fatima R., Mwaba P., et al. (2021). Global Tuberculosis Report 2020–Reflections on the Global TB burden, treatment and prevention efforts. Int. J. Infect. Dis. 113, S7–S12. doi:  10.1016/j.ijid.2021.02.107, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. Chhabra S., Kashyap A., Bhagat M., Mahajan R., Sethi S.. (2021). Anemia and nutritional status in tuberculosis patients. Int. J. Appl. Basic Med. Res. 11, 226–230. doi:  10.4103/ijabmr.ijabmr_76_21, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  11. Chidambaram V., Zhou L., Ruelas Castillo J., Kumar A., Ayeh S.K., Gupte A., et al. (2021). Higher serum cholesterol levels are associated with reduced systemic inflammation and mortality during tuberculosis treatment independent of body mass index. Front. Cardiovasc. Med. 8, 696517. doi:  10.3389/fcvm.2021.696517, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  12. Dai W., Ke P.-F., Li Z.-Z., Zhuang Q.Z., Huang W., Wang Y., et al. (2021). Establishing classifiers with clinical laboratory indicators to distinguish COVID-19 from community-acquired pneumonia: retrospective cohort study. J. Med. Internet Res. 23, e23390. doi:  10.2196/23390, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. Desikan P. (2013). Sputum smear microscopy in tuberculosis: is it still relevant? Indian J. Med. Res. 137, 442–444., PMID: [PMC free article] [PubMed] [Google Scholar]
  14. Dinnes J., Deeks J., Kunst H., Gibson A., Cummins E., Waugh N., et al. (2007). A systematic review of rapid diagnostic tests for the detection of tuberculosis infection. Health Technol. Assess. (Winchester England) 11, 1–196., PMID: [DOI] [PubMed] [Google Scholar]
  15. Dong J., Chen Y., Yao B., Zhang X., Zeng N.. (2022). A neural network boosting regression model based on XGBoost. Appl. Soft Computing 125, 109067. doi:  10.1016/j.asoc.2022.109067 [DOI] [Google Scholar]
  16. Fayed H., Mohammed A., Badawy M., Yassin A.S.. (2018). The utility and validity of immunological, inflammatory, and nutritional-based scores and indices in active Pulmonary Tuberculosis. Int. Clin. Pathol. J. 6, 199–213. doi:  10.15406/icpjl.2018.06.00188 [DOI] [Google Scholar]
  17. Foo C. D., Shrestha P., Wang L., Du Q., García-Basteiro A.L., Abdullah A.S., et al. (2022). Integrating tuberculosis and noncommunicable diseases care in low-and middle-income countries (LMICs): a systematic review. PLoS Med. 19, e1003899. doi:  10.1371/journal.pmed.1003899, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  18. Forbes B. A., Hall G. S., Miller M. B., Novak S.M., Rowlinson M., Salfinger M., et al. (2018). Practical guidance for clinical microbiology laboratories: mycobacteria. Clin. Microbiol. Rev. 31, 1–66. doi:  10.1128/cmr.00038-17, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  19. Garg R.. (2025). Beyond anemia: Red cell distribution width as a universal biomarker in contemporary medicine. J. Hematol. Allied Sci. Cham, Switzerland: Springer; 2025, 1–10. [Google Scholar]
  20. Hu Z.-D., Sun Y., Guo J., Huang Y., Qin B., Gao Q., et al. (2014). Red blood cell distribution width and neutrophil/lymphocyte ratio are positively correlated with disease activity in primary Sjögren’s syndrome. Clin. Biochem. 47, 287–290. doi:  10.1016/j.clinbiochem.2014.08.022, PMID: [DOI] [PubMed] [Google Scholar]
  21. Iqbal S., Ahmed U., Khan M. A. (2015). Haematological parameters altered in tuberculosis. Pakistan J. Physiol. 11, 13–16. [Google Scholar]
  22. Kay A. W., Fernández L. G., Takwoingi Y., Eisenhut M., Detjen A.K., Steingart K.R., et al. (2020). Xpert MTB/RIF and Xpert MTB/RIF Ultra assays for active tuberculosis and rifampicin resistance in children. Cochrane Database Systematic Rev. 8)., PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  23. Kerkhoff A. D., Wood R., Lowe D. M., Vogt M., Lawn S.D.. (2013). Blood neutrophil counts in HIV-infected patients with pulmonary tuberculosis: association with sputum mycobacterial load. PLoS One 8, e67956. doi:  10.1371/journal.pone.0067956, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  24. Kernbach J. M., Staartjes V. E. (2021). “ Foundations of machine learning-based clinical prediction modeling: Part II—Generalization and overfitting,” in Machine Learning in Clinical Neuroscience: Foundations and Applications Cham, Switzerland: Springer, 15–21., PMID: [DOI] [PubMed] [Google Scholar]
  25. Kistenev Y. V., Vrazhnov D. A., Shnaider E. E., Zuhayri H.. (2022). Predictive models for COVID-19 detection using routine blood tests and machine learning. Heliyon 8, 1–11. doi:  10.1016/j.heliyon.2022.e11185, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  26. Korniluk A., Koper-Lenkiewicz O. M., Kamińska J., Kemona H., Dymicka-Piekarska V.. (2019). Mean platelet volume (MPV): new perspectives for an old marker in the course and prognosis of inflammatory conditions. Mediators Inflammation 2019, 9213074. doi:  10.1155/2019/9213074, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  27. Kwan C. K., Ernst J. D. (2011). HIV and tuberculosis: a deadly human syndemic. Clin. Microbiol. Rev. 24, 351–376. doi:  10.1128/CMR.00042-10, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  28. Li Z. (2022). Extracting spatial effects from machine learning model using local interpretation method: An example of SHAP and XGBoost. Computers Environ. Urban Syst. 96, 101845. doi:  10.1016/j.compenvurbsys.2022.101845 [DOI] [Google Scholar]
  29. Liu Y., Xie S., Zhou J., Cai Y., Zhang P., Li J., et al. (2024). Using blood routine indicators to establish a machine learning model for predicting liver fibrosis in patients with Schistosoma japonicum. Sci. Rep. 14, 11485. doi:  10.1038/s41598-024-62521-1, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  30. Luo Y., Xue Y., Song H., Tang G., Liu W., Bai H., et al. (2022). Machine learning based on routine laboratory indicators promoting the discrimination between active tuberculosis and latent tuberculosis infection. J. Infection 84, 648–657. doi:  10.1016/j.jinf.2021.12.046, PMID: [DOI] [PubMed] [Google Scholar]
  31. Luo Y., Xue Y., Tang G., Cai Y., Yuan X., Lin Q., et al. (2021). Lymphocyte-related immunological indicators for stratifying mycobacterium tuberculosis infection. Front. Immunol. 12, 658843. doi:  10.3389/fimmu.2021.658843, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  32. Markoulidakis I., Markoulidakis G. (2024). Probabilistic confusion matrix: A novel method for machine learning algorithm generalized performance analysis. Technologies 12, 113. doi:  10.3390/technologies12070113 [DOI] [Google Scholar]
  33. Marzban C. (2004). The ROC curve and the area under it as performance measures. Weather Forecasting 19, 1106–1114. doi:  10.1175/825.1 [DOI] [Google Scholar]
  34. Mohajan H. (2014). Tuberculosis is a fatal disease among some developing countries of the world. Am. J. Infect. Dis. Microbiol. 3, 18–31. [Google Scholar]
  35. Organization W. H. (2020). Global strategy for tuberculosis research and innovation (Geneva, Switzerland: Global strategy for tuberculosis research and innovation; ). [DOI] [PubMed] [Google Scholar]
  36. Parsons L. M., Somoskövi Á., Gutierrez C., Lee E., Paramasivan C.N., Abimiku A., et al. (2011). Laboratory diagnosis of tuberculosis in resource-poor countries: challenges and opportunities. Clin. Microbiol. Rev. 24, 314–350. doi:  10.1128/CMR.00059-10, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  37. Peng F., Li Z., Yi C., Guo Q., Yang R., Long H., et al. (2017). Platelet index levels and cardiovascular mortality in incident peritoneal dialysis patients: a cohort study. Platelets 28, 576–584. doi:  10.1080/09537104.2016.1246716, PMID: [DOI] [PubMed] [Google Scholar]
  38. Prendin F., Pavan J., Cappon G., Del Favero S., Sparacino G., Facchinetti A.. (2023). The importance of interpreting machine learning models for blood glucose prediction in diabetes: an analysis using SHAP. Sci. Rep. 13, 16865. doi:  10.1038/s41598-023-44155-x, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  39. Rabbani N., Kim G. Y., Suarez C. J., Chen J.H.. (2022). Applications of machine learning in routine laboratory medicine: Current state and future directions. Clin. Biochem. 103, 1–7. doi:  10.1016/j.clinbiochem.2022.02.011, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  40. Ryu Y. J. (2015). Diagnosis of pulmonary tuberculosis: recent advances and diagnostic algorithms. Tuberculosis Respir. Dis. 78, 64. doi:  10.4046/trd.2015.78.2.64, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  41. Santos-Silva M. A., Sousa N., Sousa J. C. (2024). Artificial intelligence in routine blood tests. Front. Med. Eng. 2, 1369265. doi:  10.3389/fmede.2024.1369265 [DOI] [Google Scholar]
  42. Selvavinayagam S. T., Sankar G., Yong Y. K., Sankar S., Zhang Y., Tan H.Y., et al. (2024). Burden of Latent Tuberculosis Infection among Healthcare Workers of Primary Health Centres and its Association with Clinical Laboratory Parameters. medRxiv. doi:  10.1101/2024.09.27.24314525 [DOI] [PMC free article] [PubMed] [Google Scholar]
  43. Silva M.Âa G. S. (2024). Application of machine learning for hematological diagnosis. PhD Dissertation. Universidade do Minho. P1–114. [Google Scholar]
  44. Takefuji Y.. (2025). Beyond XGBoost and SHAP: Unveiling true feature importance. J. Hazardous Materials 2025, 137382., PMID: [DOI] [PubMed] [Google Scholar]
  45. Tang G., Luo Y., Lu F., Li W., Liu X., Nan Y., et al. (2021). Prediction of sepsis in COVID-19 using laboratory indicators. Front. Cell. infection Microbiol. 10, 586054. doi:  10.3389/fcimb.2020.586054, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  46. Verma S., Khana R., Khanna V., Kandula S., Rajgopal V.R., Prasad V.. (2025). Platelet-based biomarkers: A new frontier in inflammation monitoring for respiratory infections. F1000Research 14, 328. doi:  10.12688/f1000research.161124.1 [DOI] [Google Scholar]
  47. Wan X., Zhang R., Wang Y., Wei W., Song B., Zhang L., et al. (2025). Predicting diabetic retinopathy based on routine laboratory tests by machine learning algorithms. Eur. J. Med. Res. 30, 1–19. doi:  10.1186/s40001-025-02442-5, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  48. Xin H., Zhang H., Yang S., Liu J., Lu W., Bai L., et al. (2020). 5-year follow-up of active tuberculosis development from latent infection in rural China. Clin. Infect. Dis. 70, 947–950. doi:  10.1093/cid/ciz581, PMID: [DOI] [PubMed] [Google Scholar]
  49. Xu R., Chi H., Zhang Q., Li X., Hong Z.. (2025). Enhancing the diagnostic accuracy of colorectal cancer through the integration of serum tumor markers and hematological indicators with machine learning algorithms. Clin. Trans. Oncol. 27, 299–308. doi:  10.1007/s12094-024-03564-8, PMID: [DOI] [PubMed] [Google Scholar]
  50. Xu Y., Goodacre R. (2018). On splitting training and validation set: a comparative study of cross-validation, bootstrap and systematic sampling for estimating the generalization performance of supervised learning. J. Anal. testing 2, 249–262. doi:  10.1007/s41664-018-0068-2, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  51. Yacouby R., Axman D. (2020). “ Probabilistic extension of precision, recall, and f1 score for more thorough evaluation of classification models,” in Proceedings of the Proceedings of the first workshop on evaluation and comparison of NLP systems, F. Association for Computational Linguistics; [Google Scholar]
  52. Yadav S., Shukla S. (2016). “ Analysis of k-fold cross-validation over hold-out validation on colossal datasets for quality classification,” in Proceedings of the 2016 IEEE 6th International conference on advanced computing (IACC) (Bhimavaram, India: IEEE; ). [Google Scholar]
  53. Yang W., Chen C., Ouyang Q., Han R., Sun P., Chen H.. (2024). Machine learning models for predicting of PD-1 treatment efficacy in Pan-cancer patients based on routine hematologic and biochemical parameters. Cancer Cell Int. 24, 258. doi:  10.1186/s12935-024-03439-6, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  54. Zorina S. A., Jurja S., Mehedinti M., Stoica A.M., Chita D.S., Floris S.A., et al. (2023). Infectious microorganisms seen as etiologic agents in Parkinson’s disease. Life 13, 805. doi:  10.3390/life13030805, PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Table1.docx (570.9KB, docx)
Table2.docx (13.7KB, docx)
Table3.docx (16.7KB, docx)

Data Availability Statement

The dataset will be available upon request. Requests to access these datasets should be directed to Liang Wang, healthscience@foxmail.com.


Articles from Frontiers in Cellular and Infection Microbiology are provided here courtesy of Frontiers Media SA

RESOURCES