Distinguishing nontuberculous mycobacterial pulmonary disease from pulmonary tuberculosis using visual machine learning: a Chinese multicenter prospective surveillance cohort study
Nontuberculous mycobacteria (NTM) are opportunistic pathogens. In recent years, the incidence of NTM diseases has increased significantly worldwide. Nontuberculous mycobacterial pulmonary disease (NTM-PD) is highly similar to pulmonary tuberculosis (PTB) in clinical presentation, imaging features, and sputum smear microscopy results, which can easily cause misdiagnosis. Notably, there are significant differences between the anti-infective treatment regimens for NTM-PD and PTB; however, effective differential diagnostic methods are currently lacking, seriously limiting the standardized treatment of NTM diseases. This study aimed to distinguish NTM-PD from PTB using a visual machine learning approach. This study employed a prospective cohort design to conduct prospective national surveillance of NTM-PD in 17 hospitals participating in the China Non-Tuberculous Mycobacteria Surveillance (CNTMS). A total of 6694 patients were included in the analysis, NTM-PD was considered a positive event. Visual models based on logistic regression (LR) and a gradient boosting framework using tree-based learning algorithms (LightGBM, LGB) were developed using important predictive features such as bronchiectasis, diabetes, and geographic region. Model performance was evaluated using sensitivity, specificity, and the area under the curve (AUC). Model predictions were interpreted using SHAP (a method that explains which features drive each prediction). Nine characteristics, including bronchodilation, diabetes, HIV, etc., were screened as key variables for distinguish NTM-PD and PTB. The AUC values of Logistic regression and LightGBM models in the training set were 0.714 (95%CI: 0.679 ~ 0.749) and 0.862 (95%CI: 0.843 ~ 0.882), respectively. In the two external test sets, the average AUC values of logistic regression model and LightGBM model were 0.789 (95%CI: 0.728–0.851) and 0.798 (95%CI: 0.743–0.851), respectively. Nomogram visualization identified bronchiectasis, HIV infection, COPD, and geographic region as the major contributors to the predictive score. SHAP visualization revealed geographic region, diabetes, and occupation as the most influential features for model prediction. Logistic regression and LGB models demonstrated effective accuracy and stability in external validation, and their visualization and interpretability analyses provide auxiliary evidence for the rapid clinical differentiation between NTM-PD and PTB.
Authors
- Yu Pang
- Yaoju Tan
- Chucai Wu
- Jiaojiao Wei
- Fuzhen Zhang
- Ling Li
Institutions
- Sun Yat-sen University (CN)
- Guangdong Medical College (CN)
- Beijing Chest Hospital (CN)
- Guangdong Food and Drug Vocational College (CN)
- Guangzhou Chest Hospital (CN)
- Southern Medical University (CN)
Publication Details
- Journal
- BMC Pulmonary Medicine
- Published
- 2026-08-25
- DOI
- https://doi.org/10.1186/s12890-026-04505-7
- Primary Topic
- Tuberculosis Research and Epidemiology
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Basic and Applied Basic Research Foundation of Guangdong Province