Development and validation of machine learning diagnostic models integrating clinical, CT, and laboratory features to differentiate lung cancer from pulmonary tuberculosis in patients with solitary pulmonary nodules: a single-center retrospective study.
Yuhang Li, Weijun Wu, Huiling Xu, Jun Ma, Minwei Bao, Junjie Zhu, Shanhao Chen
Department of Medical Oncology, Shanghai Pulmonary Hospital, School of Medicine, Tongji University, Shanghai, China. · Department of Radiology, Tongren Hospital, Shanghai Jiao Tong University School of Medicine, Shanghai, China.
Key points
From the paper's conclusion- ML models integrating routine clinical, manually assessed CT, and laboratory features showed moderate discriminative performance for differentiating lung cancer from pulmonary tuberculosis in patients with SPNs. The RBF-SVM model achieved the highest validation AUC, and cross-model interpretability analyses identified nodule type and age as stable discriminative features.
Abstract
BACKGROUND: Differentiating lung cancer from pulmonary tuberculosis in patients with solitary pulmonary nodules (SPNs) remains clinically challenging, particularly in tuberculosis-endemic settings, because these two conditions may show overlapping computed tomography (CT) morphological features. This study aimed to develop and internally validate machine learning (ML) diagnostic models integrating these routinely available variables and to identify stable discriminative features using feature-importance analyses. METHODS: This single-center retrospective diagnostic prediction model development and internal validation study included adult patients with CT-detected SPNs measuring ≤3 cm and a definitive diagnosis of primary lung cancer or pulmonary tuberculosis between May 2020 and June 2024. Candidate predictors were extracted from baseline clinical information, tuberculosis-related tests, manually assessed CT morphological features, circulating tumor cell indicators, routine laboratory tests, and blood gas analysis variables obtained within 7 days before surgery or biopsy. Variables with more than 5% missingness were excluded, and 72 variables were retained before least absolute shrinkage and selection operator (LASSO) feature selection. The dataset was randomly divided into training and validation sets in a stratified 7:3 ratio. Seven ML models were subsequently constructed, including logistic regression (LR), random forest (RF), extra trees (ET), radial basis function support vector machine (RBF-SVM), k-nearest neighbors (KNN), multilayer perceptron (MLP), and gradient boosting decision tree (GBDT). Model performance was evaluated using the area under the curve (AUC) for the receiver operating characteristic (ROC) curve, sensitivity, specificity, and balanced accuracy. Permutation importance and SHapley Additive exPlanations (SHAP) analyses were further performed to assess model interpretability. RESULTS: A total of 431 patients were included, comprising 168 patients with pathologically confirmed lung cancer and 263 patients with pulmonary tuberculosis. The median age was 60.00 years (interquartile range, 53.00-67.00 years), 277 patients (64.3%) were male, 349 patients (81.0%) had solid nodules, and 277 patients (64.3%) had positive QuantiFERON-TB (QFT) results. After missingness filtering, 72 variables were retained, and 29 features were selected by LASSO for model development. Among the seven models, the RBF-SVM model achieved the highest validation AUC of 0.803, with a sensitivity of 0.686, specificity of 0.734, and balanced accuracy of 0.710. The ET model showed comparable validation performance, with an AUC of 0.791, whereas LR achieved the highest balanced accuracy of 0.711. Cross-model interpretability analyses identified nodule type and age as the most stable core features. CONCLUSIONS: ML models integrating routine clinical, manually assessed CT, and laboratory features showed moderate discriminative performance for differentiating lung cancer from pulmonary tuberculosis in patients with SPNs. The RBF-SVM model achieved the highest validation AUC, and cross-model interpretability analyses identified nodule type and age as stable discriminative features.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- A preliminary study of a machine-learning prediction model for lung cancer diagnosis based on routine blood indicators and traditional chinese medicine diagnostic parameters.Frontiers in pharmacology · 2026
- Distinguishing nontuberculous mycobacterial pulmonary disease from pulmonary tuberculosis using visual machine learning: a Chinese multicenter prospective surveillance cohort study.BMC pulmonary medicine · 2026
- Machine learning-driven PET-CT and clinical pathology model for predicting mediastinal lymph node metastasis in non-small cell lung cancer: a retrospective cohort studyPeerJ · 2026
- Development and validation of a machine-learning-based triage model incorporating systemic inflammatory, nutritional, coagulation, and tumor marker parameters for identifying baseline distant metastasis in lung cancer.Frontiers in oncology · 2026
- A parsimonious machine-learning model using routine laboratory data to differentiate nontuberculous mycobacterial disease from tuberculosis: Development and independent external validation.Diagnostic microbiology and infectious disease · 2026
- Predicting lymph node metastasis in non-small cell lung cancer using clinical and PET/CT-derived morphological features: An interpretable machine-learning study.PloS one · 2026