Predicting the risk of pulmonary embolism in patients with tuberculosis using machine learning algorithms
Haobo Kong1,2, Yong Li1,3, Ya Shen4
1Department of Geriatric Respiratory and Critical Care, Anhui Geriatric Institute, The First Affiliated Hospital of Anhui Medical University, Hefei, 230022, Anhui, China.
Background:
This study aimed to develop predictive models with robust generalization capabilities for assessing the risk of pulmonary embolism in patients with tuberculosis using machine learning algorithms.
Methods:
Data were collected from two centers and categorized into development and validation cohorts. Using the development cohort, candidate variables were selected via the Recursive Feature Elimination (RFE) method. Five machine learning algorithms, logistic regression (LR), random forest (RF), extreme gradient boosting (XGBoost), light gradient boosting machine (LightGBM), and support vector machine (SVM), were utilized to construct the predictive models. Model performance was evaluated through nested cross-validation and area under the curve (AUC) metrics, supplemented by interpretations using Shapley Additive explanations (SHAP) and line charts of AUC values. Models were subjected to external validation using an independent validation group, facilitating the early identification and management of pulmonary embolism risks in tuberculosis patients.
Results:
Data from 694 patients were used for model development, and 236 patients from the validation group met the enrollment criteria. The optimal subset of variables identified included D-dimer, smoking status, dyspnea, age, sex, diabetes, platelet count, cough, fibrinogen, hemoglobin, hemoptysis, hypertension, chronic obstructive pulmonary disease (COPD), and chest pain. The RF model outperformed others, achieving an AUC of 0.839 (95% CI 0.780-0.899) and maintaining the highest average performance in external fivefold cross-validation (AUC: 0.906 ± 0.041).
Conclusions:
The RF model demonstrates high and consistent effectiveness in predicting pulmonary embolism risk in tuberculosis patients.
More Related Videos
Related Concept Videos
Pulmonary Tuberculosis IV
Several diagnostic approaches are used to detect TB. The conventional method is the Tuberculin Skin Test (TST), also known as the Mantoux test. However, this method has...
Pulmonary Tuberculosis III
The first classification is based on the development of the disease, and it includes the following categories:
Pulmonary Tuberculosis I
Causative Organism
The primary infectious agent causing tuberculosis is Mycobacterium tuberculosis, a slow-growing, acid-fast, aerobic rod that exhibits sensitivity to heat and ultraviolet light. Instances of Mycobacterium bovis and Mycobacterium avium contributing to the development of TB infection are rare.
Mode of...
Pulmonary Tuberculosis V
Latent tuberculosis infection occurs when TB bacteria are present in a person's body, but are not causing illness or symptoms. It is not contagious, and preventive treatment is crucial to avoid the...
Pulmonary Tuberculosis II
Here is a detailed explanation of its pathophysiology:
Transmission: The process begins when a person inhales droplet nuclei containing M. tuberculosis. These are typically released into the air when an individual with pulmonary or...
Statistical Methods for Analyzing Epidemiological Data


