Development of a machine learning model for early pulmonary tuberculosis diagnosis using blood test biomarkers

Tuberculosis (TB) is a major global health threat, causing 10.6 million new cases and 1.3 million deaths in 2022. Early diagnosis is crucial, but current methods are often costly and slow for resource-limited settings. This study aimed to develop a rapid, low-cost diagnostic tool using routine blood indicators. We retrospectively analyzed data from 728 TB patients and 2,718 healthy controls. The training set was balanced using the ROSE technique. We trained seven machine learning models, using LASSO regression and forward selection to identify optimal features. The final model was interpreted with SHAP and deployed as an interactive Shiny application. The Gradient Boosting Machine (GBM) model performed optimally on the test set (AUC = 0.831, specificity = 0.855, sensitivity = 0.644). SHAP analysis identified platelet-to-lymphocyte ratio (PLR), monocyte-to-lymphocyte ratio (MLR), and platelet distribution width (PDW) as key predictors. Lowering the classification threshold to 0.24 increased sensitivity to 83.6% (specificity 59.9%), demonstrating its screening potential. An interactive web application was developed to enhance clinical utility. This study delivers a validated GBM model using routine blood tests as a cost-effective TB screening tool. Its high specificity can reduce unnecessary follow-up tests. The model’s core predictors are interpretable and provide biological insights into the inflammatory response in TB. The accompanying Shiny app increases accessibility, making it a promising tool for resource-limited settings. We propose a phased diagnostic strategy: use this model with a low threshold (0.24) for high-sensitivity initial screening, followed by confirmatory molecular testing for positive cases. This approach balances high detection rates with resource optimization. Future work should include prospective validation with cohorts including other respiratory diseases. The GBM model constructed in this study, based on routine blood indicators, demonstrated high specificity (85.5%) and favorable diagnostic performance (AUC = 0.831) in the test set. SHAP analysis identified PLR, MLR, and PDW as key predictors, reflecting the inflammatory-immune characteristics of TB. The freely accessible Shiny tool is suitable for primary screening and facilitates phased screening strategies in high-burden settings.

Authors

Institutions

Publication Details

Journal
BMC Infectious Diseases
Published
2025-11-05
DOI
https://doi.org/10.1186/s12879-025-12029-4
Primary Topic
Tuberculosis Research and Epidemiology
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Development of a machine learning model for early pulmonary tuberculosis diagnosis using blood test biomarkers

Cui Yang, Jiyang Lu, Jun Xu, Yefeng Dong et al.
BMC Infectious Diseases
Tuberculosis Research and Epidemiology
article

Development of a machine learning model for early pulmonary tuberculosis diagnosis using blood test biomarkers

Cui Yang, Jiyang Lu, Jun Xu, Yefeng Dong, Liangqiong Chen, Rongman Xu, Feiyue Ji, Yongwei Qin, Haitao Zhang, Jinliang Chen, Ruihan Ge, Deping Dong
article en

Abstract

Tuberculosis (TB) is a major global health threat, causing 10.6 million new cases and 1.3 million deaths in 2022. Early diagnosis is crucial, but current methods are often costly and slow for resource-limited settings. This study aimed to develop a rapid, low-cost diagnostic tool using routine blood indicators. We retrospectively analyzed data from 728 TB patients and 2,718 healthy controls. The training set was balanced using the ROSE technique. We trained seven machine learning models, using LASSO regression and forward selection to identify optimal features. The final model was interpreted with SHAP and deployed as an interactive Shiny application. The Gradient Boosting Machine (GBM) model performed optimally on the test set (AUC = 0.831, specificity = 0.855, sensitivity = 0.644). SHAP analysis identified platelet-to-lymphocyte ratio (PLR), monocyte-to-lymphocyte ratio (MLR), and platelet distribution width (PDW) as key predictors. Lowering the classification threshold to 0.24 increased sensitivity to 83.6% (specificity 59.9%), demonstrating its screening potential. An interactive web application was developed to enhance clinical utility. This study delivers a validated GBM model using routine blood tests as a cost-effective TB screening tool. Its high specificity can reduce unnecessary follow-up tests. The model’s core predictors are interpretable and provide biological insights into the inflammatory response in TB. The accompanying Shiny app increases accessibility, making it a promising tool for resource-limited settings. We propose a phased diagnostic strategy: use this model with a low threshold (0.24) for high-sensitivity initial screening, followed by confirmatory molecular testing for positive cases. This approach balances high detection rates with resource optimization. Future work should include prospective validation with cohorts including other respiratory diseases. The GBM model constructed in this study, based on routine blood indicators, demonstrated high specificity (85.5%) and favorable diagnostic performance (AUC = 0.831) in the test set. SHAP analysis identified PLR, MLR, and PDW as key predictors, reflecting the inflammatory-immune characteristics of TB. The freely accessible Shiny tool is suitable for primary screening and facilitates phased screening strategies in high-burden settings.

BMC Infectious DiseasesVol. 25(1)
Nantong University (CN), Affiliated Hospital of Nantong University (CN), Second People's Hospital of NanTong (CN), Hainan Medical University (CN)
China Postdoctoral Science Foundation
Openalex Percentile: Top 62%
Tuberculosis Research and Epidemiology
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.