Simplifying the Diagnosis of Tuberculous Pleural Effusion: A Machine Learning Analysis of ADA and Lymphocyte Percentage in 1134 Patients

preprint OA: closed
Full text JSON View at publisher
Full text 107,306 characters · extracted from preprint-html · click to expand
Simplifying the Diagnosis of Tuberculous Pleural Effusion: A Machine Learning Analysis of ADA and Lymphocyte Percentage in 1134 Patients | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Simplifying the Diagnosis of Tuberculous Pleural Effusion: A Machine Learning Analysis of ADA and Lymphocyte Percentage in 1134 Patients Xiaomei Hai, Bofei Liu, Yuankui Chu, Sujie Zheng, Xiuqin Chang, and 5 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7278771/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Background Background: Diagnosing tuberculous pleural effusion (TPE) is often complicated by overlapping features with other causes of pleural effusion. Adenosine deaminase (ADA) and lymphocyte percentage (LYM%) are widely used biomarkers, but their isolated diagnostic value remains limited. Methods We retrospectively enrolled 1134 patients with confirmed pleural effusion (615 TPE, 519 non-TPE) from two Chinese hospitals between 2021 and 2025. Nine pleural fluid parameters were analyzed. The dataset was divided into training (70%), validation (15%), and test (15%) sets. We developed four machine learning (ML) models—logistic regression (LR), random forest (RF), Light Gradient Boosting Machine (LightGBM), and support vector machine (SVM)—and compared their diagnostic performance to logistic models based on ADA alone, LYM% alone, and their combination. The DeLong test was used to compare AUCs. Results All pleural fluid parameters, including red blood cells, significantly differed between the TPE and non-TPE groups (p < 0.05). The RF model achieved the highest AUC (0.946), followed by LightGBM (0.945), SVM (0.945), and LR (0.934). ADA + LYM% (AUC = 0.928) outperformed ADA alone (0.815) and LYM% alone (0.905), and showed no significant difference from the full-feature RF model (p = 0.181). Both ADA and LYM% were strong positive predictors in all models. Conclusions A minimal logistic model based on ADA and LYM% demonstrates excellent diagnostic performance for TPE, comparable to more complex machine learning models. This simple and interpretable approach is well-suited for routine clinical application. Trial registration Not applicable. This retrospective diagnostic study was not registered as a clinical trial. Tuberculous Pleural Effusion ADA Lymphocyte Percentage machine learning Random Forest Logistic Regression Light Gradient Boosting Machine Support Vector Machine ROC Curve DeLong Test Decision Curve Analysis Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 1. Background Pleural effusion, an abnormal accumulation of fluid in the pleural space, is a common clinical sign associated with over 50 underlying conditions, ranging from cardio-pulmonary diseases to systemic illnesses and malignancies [ 1 ]. Tuberculous pleural effusion (TPE) is one of the most frequent forms of extrapulmonary tuberculosis, particularly in regions with a high prevalence of TB [ 2 ]. A timely and accurate diagnosis of TPE is crucial for initiating appropriate anti-tuberculosis therapy and preventing long-term complications. However, differentiating TPE from other causes of exudative effusions, such as parapneumonic effusions and malignant pleural effusions, can be challenging due to overlapping clinical and laboratory features [ 3 ]. The gold standard for TPE diagnosis is the identification of Mycobacterium tuberculosis in pleural fluid or on a pleural biopsy specimen, but these methods suffer from low sensitivity and are time-consuming or invasive [ 4 ]. Consequently, various biomarkers in pleural fluid have been investigated. Among these, adenosine deaminase (ADA) is the most widely used and recommended biomarker for TPE diagnosis due to its high sensitivity and specificity [ 5 ]. Nevertheless, its diagnostic accuracy can be compromised by other conditions like empyema, rheumatoid arthritis, and lymphoma, leading to false-positive results. The optimal cutoff value for ADA also varies across different populations, limiting its universal applicability [ 6 ]. High numbers of lymphocytes in pleural fluid have been considered part of the diagnostic criteria for pleural TB; however, in many cases, neutrophils rather than lymphocytes are the predominant cell type in pleural effusions, making diagnosis more complicated [ 7 ]. Combining ADA and Lymphocyte percentage (LYM %) could improve diagnostic performance, and recent advances in statistical modeling enable assessment of their joint value [ 8 – 22 ]. This study aimed to rigorously evaluate the utility of machine learning models of ADA, LYM%, and other basic indicators of pleural effusion for the diagnosis of TPE. 2. Methods We collected information on a total of 1134 patients with pleural effusion diagnosed in The fourth people's Hospital of Ningxia Hui Autonomous region and Zhejiang Provincial People's Hospital between January 1, 2021 and July 15, 2025. The cohort included 615 patients with TPE and 519 with non-TPE, comprising hypoproteinemia-related effusions, malignant effusions, parapneumonic effusions, and other causes (Table 1 ). The diagnosis of TPE was established based on positive mycobacterial culture from pleural fluid or biopsy, caseous granulomas on pleural biopsy, pleural effusion smear acid-fast staining, nucleic acid amplification detection technology, etc. to detect positive Mycobacterium tuberculosis, or a clinical presentation highly consistent with TPE with documented response to anti-tuberculosis therapy. All other diagnoses were confirmed through standard clinical, radiological, and pathological criteria. For each patient, the following 9 pleural fluid laboratory parameters were collected: Rivalta Test, nucleated cell count/µL, LYM %, red blood cell count (RBC)/µL, ADA (U/L), glucose (mmol/L), chloride (mmol/L), lactate dehydrogenase (LDH) (U/L), and protein (g/L). The study protocol was approved by the institutional review board (Approval No. The fourth people's Hospital of Ningxia Hui Autonomous region Ethics 2024-QSY-022), and the requirement for informed consent was waived due to the retrospective nature of the analysis. Table 1 Baseline Characteristics of TPE and Non-TPE Patient Cohorts. Feature TPE Group (n = 615) Non-TPE Group (n = 519) Demographics Age (Median (IQR)) 62(37, 76) 74(59, 81) < 0.001 Sex (Male, n (%)) 424 (68.9%) 323 (62.2%) 0.037 Categorical (n (%)) Rivalta test + 489 (79.5) 231 (44.5) < 0.001 - 94 (15.3) 227 (43.7) < 0.001 ± 32 (5.2) 61 (11.8) < 0.001 Numeric (Median (IQR)) Nucleated cell count/µL 1719 (769, 3234) 459 (160, 1583) < 0.001 Lymphocyte % 90 (81.5, 93.0) 36(16.0, 50.0) < 0.001 RBC/µL 3000 (1000, 7000) 2000 (575, 6760) 0.003 Adenosine deaminase 33.7 (14.3, 50.8) 7.1 (3.9, 13.8) < 0.001 Glucose 5.98 (4.71, 7.25) 7.06 (5.71, 8.84) < 0.001 Chloride 101.2 (98.3, 104.1) 102.7 (99.3, 106.9) < 0.001 LDH 349.0 (176.7, 619.2) 143.0 (89.5, 310.0) < 0.001 Protein 44.2 (34.8, 50.4) 27.1 (18.2, 39.0) < 0.001 Median (Interquartile Range, IQR), or n (%). P-values calculated using Mann-Whitney U test Prior to model training, the raw data underwent several preprocessing steps to ensure data quality and prepare it for machine learning algorithms. Column names were cleaned by removing leading and trailing whitespace. The 'Rivalta Test' feature, which contained categorical values ('+', '-', '±'), was mapped to numerical values: '+' to 1, '-' to 0, and '±' to 0.5. No explicit missing value imputation or outlier treatment was performed based on the initial data inspection which showed no missing values and the robust nature of tree-based models to outliers. Numerical features were scaled using StandardScaler to have zero mean and unit variance, which is crucial for distance-based models like SVM and KNN, and can also benefit regularization in Logistic Regression. Categorical features were transformed using OneHotEncoder to convert them into a numerical format suitable for machine learning algorithms, with handle_unknown='ignore' to manage potential unseen categories during prediction. The entire dataset (N = 1134) was randomly partitioned into a training set (70%, n = 793), a validation set (15%, n = 170), and a final, unseen test set (15%, n = 171). The partitioning was stratified by the diagnosis to maintain the class balance. Four machine learning algorithms were selected: Logistic Regression, Support Vector Machine (SVM), Random Forest, and Light Gradient Boosting Machine. The primary metric for model evaluation was the Area Under the Receiver Operating Characteristic Curve (AUC). To determine the statistical significance of the performance difference between ML models and ADA, LYM %, and ADA + LYM %, we compared their prediction scores on the test set using the DeLong test. A two-sided p-value less than 0.05 was considered statistically significant. Feature importance scores were extracted from the best-performing model to quantify the contribution of each laboratory parameter. All analyses and modeling were performed in Python 3.10 using Google Colaboratory (Google, Mountain View, CA, USA). The following packages and versions were used: scikit-learn 1.3.0, lightgbm 3.3.5, numpy 1.24.3, pandas 1.5.3, matplotlib 3.7.1, seaborn 0.12.2, and statsmodels 0.14.0. 3. Results 3.1. Baseline Characteristics and Exploratory Analysis Table 1 summarizes the pleural fluid parameters for TPE and non-TPE groups. Compared to the non-TPE group, patients with TPE had significantly higher levels of nucleated cell count, LYM%, ADA, LDH, and protein, and lower levels of glucose and chloride (all p < 0.05). Among these, ADA and LYM% demonstrated the most notable group separation (Fig. 2 ). Red blood cell count also showed a statistically significant difference, although the effect size was smaller (p = 0.003). 3.2. Diagnostic Performance of Machine Learning Models Evaluation on the independent test set demonstrated that machine learning models using the full feature set (Logistic Regression, SVM, Random Forest, LightGBM) generally exhibited higher diagnostic accuracy compared to baseline models using only single markers (ADA or Lymphocyte %). AUC Performance: The full-feature models consistently showed high AUC values (ranging from 0.934 for Logistic Regression to 0.946 for Random Forest), significantly outperforming the ADA-only model (AUC = 0.815) and the Lymphocyte %-only model (AUC = 0.905). The baseline model using the combination of ADA + Lymphocyte % (AUC = 0.928) also performed well, approaching the performance of the full-feature models. Other Performance Metrics: At the optimal probability cutoff, full-feature models also generally surpassed single-marker baseline models in metrics such as Accuracy, Sensitivity, Specificity, Precision, and F1-score. For example, the Random Forest model achieved an accuracy of 0.877, sensitivity of 0.871, and specificity of 0.885 on the test set (Fig. 3 , Fig. 4 , Table 2 ). Table 2 Performance Metrics on Test Set (at Optimal Cutoff): Model AUC Optimal Cutoff Accuracy Sensitivity Specificity Precision F1-score LR 0.934 0.603 0.871 0.86 0.885 0.899 0.879 SVM 0.945 0.534 0.883 0.871 0.897 0.91 0.89 RF 0.946 0.46 0.877 0.871 0.885 0.9 0.885 LightGBM 0.945 0.724 0.883 0.86 0.91 0.92 0.889 ADA (LR) 0.815 0.446 0.76 0.796 0.718 0.771 0.783 LYM% (LR) 0.905 0.444 0.854 0.903 0.795 0.84 0.87 ADA + LYM%(LR) 0.928 0.795 0.854 0.785 0.936 0.936 0.854 ADA, adenosine deaminase; AUC, area under the receiver operating characteristic curve; LR, logistic regression; LYM%, lymphocyte percentage; RF, random forest; SVM, Support Vector Machine. 3.3. Feature Importance Analysis Feature importance analysis conducted on the best-performing model (Random Forest) confirmed Lymphocyte % and ADA as the most important predictors, while also revealing the contribution of other parameters like Protein, LDH, and Nucleated cell count to the model's diagnosis. This supports the value of a comprehensive analysis of multiple laboratory parameters (Fig. 5 ). 3.4. DeLong Test for AUC Comparison DeLong's test results further confirmed that the AUC of the full-feature model (Random Forest) on the test set was statistically significantly higher than that of the ADA-only (p = 0.0000) and Lymphocyte %-only (p = 0.0376) models. However, the AUC difference between the full-feature model and the model using the ADA + Lymphocyte % combination was not statistically significant (p = 0.1669). This indicates that while the combination of ADA and Lymphocyte % captures much of the important diagnostic information, adding more features provides additional (though not statistically significant in this dataset) gain (Table 3 ). Table 3 Comparison AUC of Random Forest AUC of Comparator DeLong's Test p-value Statistically Significant (p < 0.05) Comparison AUC1 AUC2 p-value Significant Random Forest vs. ADA (LR) 0.946 0.815 0.0000 Yes Random Forest vs. LYM%(LR) 0.946 0.905 0.0376 Yes Random Forest vs. ADA + LYM% (LR) 0.946 0.928 0.1669 No LYM % (LR) vs. ADA (LR) 0.905 0.815 0.0322 Yes ADA + LYM%(LR) vs. ADA (LR) 0.928 0.815 0.0005 Yes ADA + LYM%(LR) vs. LYM% (LR) 0.928 0.905 0.0748 No 3.5. Predicted Probability Distribution Decision Curve Analysis demonstrated that the full-feature model (Random Forest) and the ADA + Lymphocyte % combination model provided a higher net benefit than "treat all" or "treat none" strategies across most clinically relevant risk thresholds (approximately 0.1 to 0.8). This suggests the potential clinical utility of these models in guiding treatment decisions (Fig. 6 ). 3.6. Optimal Cutoff Corresponding Feature Values: For the single-feature baseline models, we calculated the original feature values corresponding to their optimal probability cutoffs: The optimal cutoff probability of 0.446 for the "Only ADA (LR)" model corresponds to an ADA value of approximately 13.80 U/L. The optimal cutoff probability of 0.444 for the "Only Lymphocyte % (LR)" model corresponds to a Lymphocyte % value of approximately 52.53%. These values provide data-driven optimal discrimination thresholds, which differ from the commonly used empirical cutoffs like ADA 40 U/L or Lymphocyte % 50% in clinical practice. 4. Discussion The findings of this study reinforce and extend the current understanding of TPE diagnosis. While the Infectious Diseases Society of America (IDSA) guidelines recommend the use of ADA for the diagnosis of TPE [ 23 ], and use 40 U/L as a threshold for initiating anti-TB treatment [ 24 ], our data show that its diagnostic utility is limited when used alone. As demonstrated in this study, more than half of TPE patients had pleural fluid ADA levels below 40 U/L, highlighting the limitations of pleural fluid ADA as a single diagnostic marker [ 10 ]. This finding is consistent with recent studies questioning the reliability of ADA thresholds, particularly in elderly or critically ill patients. In other studies, the proportion of low ADA is usually not as high, but it is also a common occurrence [ 25 ]. Importantly, we found that the diagnostic performance of a logistic regression model based on LYM% alone was better than that of ADA, with a higher AUC and sensitivity. This novel observation highlights the strong discriminatory power of LYM% in our dataset, which has not been reported in prior studies. Our study also revealed that a simple logistic regression model combining ADA and LYM% yielded diagnostic performance comparable to that of more complex machine learning models, including RF, LightGBM, and SVM. Our models were able to effectively leverage the combined power of several pleural fluid parameters. The initial data exploration revealed distinct differences in several key laboratory parameters between TPE and non-TPE cases, including Rivalta Test, nucleated cell count, LYM %, RBC, ADA, glucose, chloride, LDH, and protein. These observed differences are consistent with the known pathophysiology of TPE, as pleural effusions from patients with tuberculosis are often dominated by a Th1 cell immune response, which explains the high lymphocyte counts and elevated activity of ADA, a purine-degrading enzyme found primarily in T lymphocytes [ 26 ]. However, up to 10% of TPE patients may have a neutrophil-predominant cell population [ 27 ]. TPE also typically presents with higher nucleated cells, red blood cells, protein, and LDH, and lower glucose and chloride concentrations compared to non-TPE, which is consistent with some studies [ 28 – 30 ]. The Random Forest model identified LYM%, ADA, and protein as the top features, aligning with this pathophysiological profile of a lymphocyte-dominant exudate. This multivariable pattern recognition enabled superior discrimination of TPE versus non-TPE compared to single-marker models. The consistently high AUC scores (above 0.93) achieved by all models (RF, LR, SVM, and LightGBM) on the independent test set underscore their excellent ability to differentiate between TPE and non-TPE effusions across various probability thresholds. This high performance suggests that the combined information from these markers provides a more comprehensive diagnostic signature than any single marker. This study has several strengths. First, it utilized a dataset that included common and easily accessible pleural effusion laboratory parameters, making the developed model potentially applicable in a variety of clinical settings. Second, the rigorous methodology used, including a clear partitioning of the data into training, validation, and test sets, helped ensure that the reported performance metrics provided unbiased estimates of the model's generalization ability. Hyperparameter tuning combined with cross-validation further enhanced the model's robustness and prevented overfitting. Third, the evaluation was comprehensive, using multiple relevant metrics (AUC, accuracy, precision, recall, F1 score) to fully demonstrate the model's performance. Finally, formal statistical comparisons using the DeLong test provided strong evidence of the superior discriminative ability of the developed model compared to the ADA. Despite these strengths, this study has limitations. The dataset, although comprehensive in terms of parameters, originates from two centers in China. The performance of the models might vary when applied to data from different populations or clinical settings, highlighting the need for external validation on geographically diverse cohorts. The dataset size, while sufficient for model training in this study, could be expanded to further improve model generalization and capture more rare variations. Although a diverse set of machine learning models was explored, other advanced techniques could potentially yield further improvements. The engineered features were based on simple interactions and polynomials; more complex feature engineering or automated feature learning methods might uncover additional predictive patterns. Finally, while ADA and LYM% appear sufficient for high diagnostic performance, further investigation into combining them with additional novel biomarkers (e.g., IL-27 or IFN-γ) may further improve diagnostic accuracy. The findings of this study have significant clinical implications. A highly accurate diagnostic model for TPE could lead to faster and more confident diagnoses, potentially reducing the time to initiation of appropriate anti-tuberculosis therapy. This could, in turn, minimize the risk of developing severe complications like constrictive pericarditis, which often requires complex surgical intervention and is associated with significant morbidity and mortality. Our study supports the routine clinical use of ADA and LYM% in combination for diagnosing TPE. A simple logistic model based on these two parameters performs comparably to advanced machine learning algorithms, offering an interpretable and cost-effective solution for frontline diagnosis. Such a tool could assist clinicians in interpreting complex laboratory profiles and making more informed decisions regarding patient management, potentially reducing the need for more invasive diagnostic procedures in certain cases. Building upon these findings, future research should focus on several key areas. External validation of the developed models on independent datasets from diverse geographic locations and patient populations is crucial to confirm their generalizability. Including additional clinical data, such as patient demographics, comorbidities, symptoms, and imaging findings (e.g., echocardiography characteristics), could further improve model performance and provide a more holistic diagnostic tool. Exploring other advanced machine learning techniques, such as deep learning or more sophisticated ensemble methods, might also yield further improvements. Ultimately, the development of a user-friendly clinical tool incorporating these models could facilitate their practical application at the point of care. Further studies could also investigate the cost-effectiveness of implementing such a machine learning-based diagnostic approach compared to current clinical practice. 5. Conclusions In this study, we successfully developed and evaluated machine learning models for the diagnosis of tuberculous pleural effusion (TPE) using comprehensive pleural effusion parameters and engineered features. The results showed that incorporating multiple laboratory parameters through machine learning significantly improved diagnostic performance compared with relying solely on ADA (LR), LYM % (LR), and ADA + LYM % (LR), as confirmed by the statistically significant difference in AUC of the DeLong test. The developed models, especially random forest, logistic regression, and support vector machine, achieved high accuracy and discrimination on an independent test set. These findings suggest that machine learning-based methods have the potential to be an effective tool to help clinicians diagnose TPE in a timely and accurate manner, which may improve patient outcomes and reduce complications. To promote the clinical translation of these models, further validation on external datasets and exploration of more features are necessary. Abbreviations ADA adenosine deaminase AUC area under the receiver operating characteristic curve LDH lactate dehydrogenase LR logistic regression LYM% lymphocyte percentage ML machine learning ROC Receiver Operating Characteristic RF random forest SVM Support Vector Machine TPE tuberculous pleural effusion LightGBM light gradient boosting machine Declarations Trial registration: Not applicable. This retrospective diagnostic study was not registered as a clinical trial. Ethics approval and consent to participate: This study was conducted in accordance with the Declaration of Helsinki and was approved by the Institutional Review Board of The Fourth People’s Hospital of Ningxia Hui Autonomous Region (approval No. 2024-QSY-022). The requirement for informed consent was waived due to the retrospective design. Consent for publication: Not applicable. The requirement for informed consent for publication was waived due to the retrospective nature of the study. All authors have read and approved the final manuscript and consent to its publication. Availability of data and materials: The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request. Competing Interests: The authors declare that they have no competing interests. Funding: This research was funded by the “Youth Science and Technology Cultivational Project of Ningxia Hui Autonomous Region Health Commission:2024-NWQP-B049”. Author Contributions: Conceptualization, Xiaomei Hai and Bofei Liu.; methodology, Xiaomei Hai.; software, Xiangjun Ye; validation, Xiaomei Hai, Bofei Liu and Yuankui Chu.; formal analysis, Yuankui Chu.; investigation, Xiaomei Hai.; resources, Sujie Zheng, Guoren Ma, Jing Liu, Meng Hao , Tao Liu.; data curation, Xiuqin Chang.; writing—original draft preparation, Xiaomei Hai.; writing—review and editing, Xiangjun Ye.; visualization, Xiangjun Ye.; supervision, Xiaomei Hai; project administration, Xiaomei Hai.; funding acquisition, Xiaomei Hai. All authors have read and agreed to the published version of the manuscript. Acknowledgments: The authors thank the staff of the participating hospitals for their assistance with data collection. References Jany B, Welte T. Pleural Effusion in Adults—Etiology, Diagnosis, and Treatment. Dtsch Arztebl Int. 2019;116(21):377–86. Shaw JA, Koegelenberg CFN. Tuberculous pleural effusion. Respirology. 2021;26(1):44–57. Vorster MJ, Allwood BW, Diacon AH. Tuberculous pleural effusions: advances and controversies. J Thorac Dis. 2015;7(6):981–91. Zhai K, Lu Y, Shi HZ. Tuberculous pleural effusion. J Thorac Dis. 2016;8(7):E486–94. Liang QL, Shi HZ, Wang K, Qin SM, Qin XJ. Diagnostic accuracy of adenosine deaminase in tuberculous pleurisy: a meta-analysis. Respir Med. 2008;102(5):744–54. Shaw JA, Diacon AH, Koegelenberg CFN. Tuberculous pleural effusion. Respirology. 2019;24(10):962–71. Choi H, Chon HR, Kim K, et al. Clinical and laboratory differences between lymphocyte- and neutrophil-predominant pleural tuberculosis. PLoS ONE. 2016;11:e0165428. Garcia-Zamalloa A, Taboada-Gomez J. Diagnostic accuracy of adenosine deaminase and lymphocyte proportion in pleural fluid for tuberculous pleurisy in different prevalence scenarios. PLoS ONE. 2012;7(6):e38729. Chen QY, Yin SM, Shao MM, Yi FS, Shi HZ. Machine learning-based Diagnostic model for determining the etiology of pleural effusion using Age, ADA and LDH. Respir Res. 2025;26(1):170. Ren Z, Hu Y, Xu L. Identifying tuberculous pleural effusion using artificial intelligence machine learning algorithms. Respir Res. 2019;20:220. Jang H, Lee Chang–Min, Choi N, Park HJ, Park, et al. Classification of pleural effusions using deep learning visual models: contrastive–loss. Sci Rep. 2022;12:5532. Zhang Q, Zhao D, Hou L, Heidari AA, Chen Y, Liu L, Chen H, Li C. An enhanced machine learning framework for accurate diagnosis of tuberculous pleural effusion. J Big Data. 2025;12:75. Wu C, Liu W, Mei P, Liu Y, Cai J, Liu L, Wang J, Ling X, Wang M, Cheng Y, He M, He Q, He Q, Yuan X, Tong J. The large language model diagnoses tuberculous pleural effusion in pleural effusion patients through clinical feature landscapes. Respir Res. 2025;26(1):52. Li C, Hou L, Sharma BY, et al. Developing a new intelligent system for the diagnosis of tuberculous pleural effusion. Comput Methods Programs Biomed. 2018;153:211–25. Liu Y, Liang Z, Yang J, Yuan S, Wang S, Huang W, et al. Diagnostic and comparative performance for the prediction of tuberculous pleural effusion using machine learning algorithms. Int J Med Inf. 2024;182:105320. Garcia-Zamalloa A, Vicente D, Arnay R, Arrospide A, Taboada J, Castilla-Rodriguez I, et al. Diagnostic accuracy of adenosine deaminase for pleural tuberculosis in a low prevalence setting: A machine learning approach within a 7-year prospective multi-center study. PLoS ONE. 2021;16(11):e0259203. Li C, Hou L, Sharma BY, Li H, Chen C, Li Y, Zhao X, Huang H, Cai Z, Chen H. Developing a new intelligent system for the diagnosis of tuberculous pleural effusion. Comput Methods Programs Biomed. 2018;153:211–25. Zhang Q, Zhao D, Hou L, Heidari AA, Chen Y, Liu L, Chen H, Li C. (2025). An enhanced machine learning framework for accurate diagnosis of tuberculous pleural effusion. Journal of Big Data, 2025, 12(1): 75. Liu S, Yang Y, Wang D, et al. 1 Development and Validation of a Prediction Model Based on a Nomogram for Tuberculous Pleural Effusion[J]. Front Med. 2025;12:1589406. Zhou X, Chen Y, Gui W, et al. Enhanced differential evolution algorithm for feature selection in tuberculous pleural effusion clinical characteristics analysis. Artif Intell Med. 2024;153:102886. Huyen PT, Li M, Li L, et al. Exploring the value of pleural fluid biomarkers for complementary pleural effusion disease examination. Comput Biol Chem. 2021;94:107559. Wei TT, Zhang JF, Cheng Z, et al. Development and validation of a machine learning model for differential diagnosis of malignant pleural effusion using routine laboratory data. Ther Adv Respir Dis. 2023;17:17534666231208632. Lewinsohn DM, Leonard MK, LoBue PA, Cohn DL, Daley CL, Desmond E, et al. Official American thoracic society/infectious Diseases society of America/centers for disease control and prevention clinical practice guidelines: diagnosis of tuberculosis in adults and children. Clin Infect Dis. 2017;64(2):111–5. Kaewwinud J, Pienchitlertkajorn S, Koomtanapat K, Lumkul L, Wongyikul P, Phinyo P. Diagnostic scoring systems for tuberculous pleural effusion in patients with lymphocyte-predominant exudative pleural profile: A development study. Heliyon. 2024;10(1):e23440. Kim SB, Shin B, Lee JH, et al. Pleural fluid ADA activity in tuberculous pleurisy can be low in elderly, critically ill patients with multi-organ failure. BMC Pulm Med. 2020;20(1):13. da Cunha Lisboa V, Ribeiro-Alves M, da Silva Corrêa R, Ramos Lopes I, Mafort TT, Santos AP, Porto Amadeu T, Rufino R, Silva Rodrigues L. Predominance of Th1 Immune Response in Pleural Effusion of Patients with Tucerculosis among Other Exudative Etiologies. J Clin Microbiol. 2019;58. 10.1128/jcm.00927 – 19 . Zhao T, Chen B, Xu Y, Qu Y. Clinical and pathological differences between polymorphonuclear-rich and lymphocyte-rich tuberculous pleural effusion. Ann Thorac Med. 2020;15(2):76–83. Lee J, Lim JK, Yoo SS, Lee SY, Cha SI, Park JY, Kim CH. Different characteristics of tuberculous pleural effusion according to pleural fluid cellular predominance and loculation. J Thorac Dis. 2016;8(8):1935–42. Zhao T, Zhang J, Zhang X, Wang C. Clinical significance of pleural fluid lactate dehydrogenase/adenosine deaminase ratio in the diagnosis of tuberculous pleural effusion. BMC Pulm Med. 2024;24(1):241. Darooei R, Sanadgol G, Gh-Nataj A, Almasnia M, Darivishi A, Eslaminejad A, et al. Discriminating Tuberculous Pleural Effusion from Malignant Pleural Effusion Based on Routine Pleural Fluid Biomarkers, Using Mathematical Methods. Tanaffos. 2017;16(2):157–65. Additional Declarations No competing interests reported. Supplementary Files pleuraleffusionlab.csv Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-7278771","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":521713884,"identity":"61b1b14a-88b4-4aa9-9017-2a997e7b36a6","order_by":0,"name":"Xiaomei Hai","email":"","orcid":"","institution":"The fourth people's Hospital of Ningxia Hui Autonomous region,Yinchuan","correspondingAuthor":false,"prefix":"","firstName":"Xiaomei","middleName":"","lastName":"Hai","suffix":""},{"id":521713885,"identity":"9a15340b-1a7c-4ab9-a5d7-96ef9ddddc19","order_by":1,"name":"Bofei Liu","email":"","orcid":"","institution":"The fourth people's Hospital of Ningxia Hui Autonomous region,Yinchuan","correspondingAuthor":false,"prefix":"","firstName":"Bofei","middleName":"","lastName":"Liu","suffix":""},{"id":521713886,"identity":"f4869e14-a3ca-4ba1-926d-56757e3ab0bf","order_by":2,"name":"Yuankui Chu","email":"","orcid":"","institution":"Ningxia Medical University,Yinchuan","correspondingAuthor":false,"prefix":"","firstName":"Yuankui","middleName":"","lastName":"Chu","suffix":""},{"id":521713887,"identity":"0e951c08-07a0-4f68-b063-1beea9abe671","order_by":3,"name":"Sujie Zheng","email":"","orcid":"","institution":"Zhejiang Provincial People's Hospital (Affiliated People's Hospital, Hangzhou Medical College)","correspondingAuthor":false,"prefix":"","firstName":"Sujie","middleName":"","lastName":"Zheng","suffix":""},{"id":521713890,"identity":"2f247781-7dd5-42a4-a787-2d0761449d0d","order_by":4,"name":"Xiuqin Chang","email":"","orcid":"","institution":"The fourth people's Hospital of Ningxia Hui Autonomous region,Yinchuan","correspondingAuthor":false,"prefix":"","firstName":"Xiuqin","middleName":"","lastName":"Chang","suffix":""},{"id":521713892,"identity":"10113c95-0e6a-4e4a-b5b7-2e30d2f4c222","order_by":5,"name":"Guoren Ma","email":"","orcid":"","institution":"The fourth people's Hospital of Ningxia Hui Autonomous region,Yinchuan","correspondingAuthor":false,"prefix":"","firstName":"Guoren","middleName":"","lastName":"Ma","suffix":""},{"id":521713895,"identity":"06f64f6d-5d6d-41f4-84d8-86a887ed7ba0","order_by":6,"name":"Jing Liu","email":"","orcid":"","institution":"The fourth people's Hospital of Ningxia Hui Autonomous region,Yinchuan","correspondingAuthor":false,"prefix":"","firstName":"Jing","middleName":"","lastName":"Liu","suffix":""},{"id":521713896,"identity":"08ff30f0-779b-48e3-a801-fbc73345ea33","order_by":7,"name":"Meng Hao","email":"","orcid":"","institution":"The fourth people's Hospital of Ningxia Hui Autonomous region,Yinchuan","correspondingAuthor":false,"prefix":"","firstName":"Meng","middleName":"","lastName":"Hao","suffix":""},{"id":521713897,"identity":"74cf2e58-3d67-49a1-823c-6b118b78c1fc","order_by":8,"name":"Tao Liu","email":"","orcid":"","institution":"The fourth people's Hospital of Ningxia Hui Autonomous region,Yinchuan","correspondingAuthor":false,"prefix":"","firstName":"Tao","middleName":"","lastName":"Liu","suffix":""},{"id":521713899,"identity":"ffb2beb1-83c0-4eca-a4eb-4da31634f2a4","order_by":9,"name":"Xiangjun Ye","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAvklEQVRIiWNgGAWjYLACiQoGZjBNlGoesNIzJGthbIPaRpQWe/YeMwnLeXXsBgeYD97mYbDLI2wLzxljA8ltbMwGB9iSrXkYkosJa5HIMXwguY0HqIXHTJqH4UBiAxFaDA5IzpEAauH/RrQWoC0NBiBb2IjUcuZYsYHEsQRmycNsxpZzDJIJa2Fvb94mLVFTl8x3vPnhjTcVdoS1MDBwGDAD4yMZEpkGhNWD7HnA+IGBwY4otaNgFIyCUTAyAQDWQzBBXs4JawAAAABJRU5ErkJggg==","orcid":"","institution":"The fourth people's Hospital of Ningxia Hui Autonomous region,Yinchuan","correspondingAuthor":true,"prefix":"","firstName":"Xiangjun","middleName":"","lastName":"Ye","suffix":""}],"badges":[],"createdAt":"2025-08-02 14:08:26","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-7278771/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-7278771/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":92475808,"identity":"44ec0e1c-6b88-4ce1-91a5-40a95bec4e2e","added_by":"auto","created_at":"2025-09-30 07:17:59","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":867042,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.docx","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/870393678cb7b025619b4463.docx"},{"id":92478017,"identity":"b7f49317-b773-44a3-8b03-0fa34cb55622","added_by":"auto","created_at":"2025-09-30 07:26:00","extension":"json","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":10573,"visible":true,"origin":"","legend":"","description":"","filename":"c50b6d1585244b3b844b9dca1089c66b.json","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/d88ad6461e287fabcedd2283.json"},{"id":92475813,"identity":"4d403b5a-6b14-4b99-b9a0-9ffec2113b6c","added_by":"auto","created_at":"2025-09-30 07:18:00","extension":"csv","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":58538,"visible":true,"origin":"","legend":"","description":"","filename":"pleuraleffusionlab.csv","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/6e13cbb68372e21af9bbc1ea.csv"},{"id":92475817,"identity":"486b4cec-f30b-4b55-a721-e61f46908ba3","added_by":"auto","created_at":"2025-09-30 07:18:00","extension":"xml","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":100851,"visible":true,"origin":"","legend":"","description":"","filename":"c50b6d1585244b3b844b9dca1089c66b1enriched.xml","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/820ff92f47d357cf947469f2.xml"},{"id":92475818,"identity":"ef0f2b06-decc-4d8e-89fe-a9e1ef60dea1","added_by":"auto","created_at":"2025-09-30 07:18:00","extension":"png","order_by":10,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":69728,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/737c051ae028ac0b4ef51d42.png"},{"id":92478021,"identity":"08794e13-25dd-49a2-b590-16c3f73be5e7","added_by":"auto","created_at":"2025-09-30 07:26:00","extension":"png","order_by":11,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":94033,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/5037232e18a5f0754339b7b6.png"},{"id":92475821,"identity":"4c5e65a1-6c57-41b7-b71d-073bffb40bf5","added_by":"auto","created_at":"2025-09-30 07:18:00","extension":"png","order_by":12,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":18598,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/0810872eeec1bb26dacc2e2a.png"},{"id":92475812,"identity":"4fa35b83-83a7-4343-a1d2-eda3d22a0455","added_by":"auto","created_at":"2025-09-30 07:18:00","extension":"png","order_by":13,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":26866,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/e31b199893e8469b76663961.png"},{"id":92475816,"identity":"7fef6f22-6f6f-4e23-83bd-1a45d9ce67bf","added_by":"auto","created_at":"2025-09-30 07:18:00","extension":"png","order_by":14,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":11765,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage5.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/710b073eb734543af91bc9e7.png"},{"id":92475824,"identity":"12f6ca86-81a5-4ee6-816e-6d15625fab13","added_by":"auto","created_at":"2025-09-30 07:18:00","extension":"png","order_by":15,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":13964,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage6.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/fba4aefbb47e22b2a05527a1.png"},{"id":92475823,"identity":"2b30c564-65e5-4b80-b483-e57dcc35cb71","added_by":"auto","created_at":"2025-09-30 07:18:00","extension":"xml","order_by":16,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":96642,"visible":true,"origin":"","legend":"","description":"","filename":"c50b6d1585244b3b844b9dca1089c66b1structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/bacf92c72ac7ad6e8e58a16a.xml"},{"id":92475815,"identity":"c3ad1f76-d30f-4b77-a815-8a9b40a4a643","added_by":"auto","created_at":"2025-09-30 07:18:00","extension":"html","order_by":17,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":108900,"visible":true,"origin":"","legend":"","description":"","filename":"earlyproof.html","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/c3d6fc1485f198bedbb78f37.html"},{"id":92475806,"identity":"06245faf-de58-422c-84e2-f178ec0f2109","added_by":"auto","created_at":"2025-09-30 07:17:59","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":182158,"visible":true,"origin":"","legend":"\u003cp\u003eFlow chart of the study design.\u003c/p\u003e","description":"","filename":"floatimage114.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/59e4f399066dba0b7ad5a04e.png"},{"id":92478584,"identity":"c2a74dd4-df44-4348-8451-18f98ece132d","added_by":"auto","created_at":"2025-09-30 07:34:00","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":205242,"visible":true,"origin":"","legend":"\u003cp\u003eBoxplots comparing pleural fluid parameters between TPE and non-TPE groups with p-values from Mann–Whitney U tests. P values were calculated using the Mann–Whitney U test, which showed statistically significant differences between TPE and non-TPE for both parameters(p \u0026lt; 0.001), except for red blood cells (p= 0.003).\u003c/p\u003e","description":"","filename":"floatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/87a2bbeb43301d38da3079e0.png"},{"id":92478019,"identity":"693584c7-8659-491c-b915-6e919d525d4a","added_by":"auto","created_at":"2025-09-30 07:26:00","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":64498,"visible":true,"origin":"","legend":"\u003cp\u003eReceiver Operating Characteristic (ROC) curves for the machine learning models on the validation set. The Random Forest model (AUC = 0.989) demonstrates the best performance.\u003c/p\u003e","description":"","filename":"floatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/f8501fe56955179a11790e56.png"},{"id":92475819,"identity":"41d83a4a-fb2e-499b-85a1-dea1a4c3624c","added_by":"auto","created_at":"2025-09-30 07:18:00","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":97499,"visible":true,"origin":"","legend":"\u003cp\u003eFour machine learning models and ADA, LYM %, and ADA+ LYM % used in the test set. ADA+ LYM % has comparable effects with three of the models.\u003c/p\u003e","description":"","filename":"floatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/f71b2474437164ac255d7693.png"},{"id":92478020,"identity":"39ff719e-bea9-434e-b9b8-59ca23dfe938","added_by":"auto","created_at":"2025-09-30 07:26:00","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":40459,"visible":true,"origin":"","legend":"\u003cp\u003eTop 10 Feature importance from the Random Forest Model.\u003c/p\u003e","description":"","filename":"floatimage5.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/29a66ee4b7d5948faf518c9e.png"},{"id":92475809,"identity":"3472e780-3ddf-4fa9-bd79-9a81310353ce","added_by":"auto","created_at":"2025-09-30 07:17:59","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":42198,"visible":true,"origin":"","legend":"\u003cp\u003eDistribution of Predicted Probabilities for Random Forest Model on Test Set (Note: Figure 6 shows the distribution of predicted probabilities for Diagnosis Non-TPE and Diagnosis TPE from the Random Forest model trained on scaled data on the test set. A clear separation between the peaks of the two distributions indicates good discriminative ability.)\u003c/p\u003e","description":"","filename":"floatimage6.png","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/4d6327e1c2314a667bfc384e.png"},{"id":105898034,"identity":"3ddb403d-91c0-4c14-8976-fa72363e78b4","added_by":"auto","created_at":"2026-04-01 08:59:06","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1326194,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/a629e2d8-eb93-40cd-bf2c-3a68117926a4.pdf"},{"id":92475805,"identity":"2ea5519f-2bc7-446f-957d-7edee2f60a37","added_by":"auto","created_at":"2025-09-30 07:17:59","extension":"csv","order_by":0,"title":"","display":"","copyAsset":false,"role":"supplement","size":58538,"visible":true,"origin":"","legend":"","description":"","filename":"pleuraleffusionlab.csv","url":"https://assets-eu.researchsquare.com/files/rs-7278771/v1/557d76caa849f629a1f3c444.csv"}],"financialInterests":"No competing interests reported.","formattedTitle":"Simplifying the Diagnosis of Tuberculous Pleural Effusion: A Machine Learning Analysis of ADA and Lymphocyte Percentage in 1134 Patients","fulltext":[{"header":"1. Background","content":"\u003cp\u003ePleural effusion, an abnormal accumulation of fluid in the pleural space, is a common clinical sign associated with over 50 underlying conditions, ranging from cardio-pulmonary diseases to systemic illnesses and malignancies [\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e]. Tuberculous pleural effusion (TPE) is one of the most frequent forms of extrapulmonary tuberculosis, particularly in regions with a high prevalence of TB [\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e]. A timely and accurate diagnosis of TPE is crucial for initiating appropriate anti-tuberculosis therapy and preventing long-term complications. However, differentiating TPE from other causes of exudative effusions, such as parapneumonic effusions and malignant pleural effusions, can be challenging due to overlapping clinical and laboratory features [\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e].\u003c/p\u003e\u003cp\u003eThe gold standard for TPE diagnosis is the identification of Mycobacterium tuberculosis in pleural fluid or on a pleural biopsy specimen, but these methods suffer from low sensitivity and are time-consuming or invasive [\u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e]. Consequently, various biomarkers in pleural fluid have been investigated. Among these, adenosine deaminase (ADA) is the most widely used and recommended biomarker for TPE diagnosis due to its high sensitivity and specificity [\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e]. Nevertheless, its diagnostic accuracy can be compromised by other conditions like empyema, rheumatoid arthritis, and lymphoma, leading to false-positive results. The optimal cutoff value for ADA also varies across different populations, limiting its universal applicability [\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e].\u003c/p\u003e\u003cp\u003eHigh numbers of lymphocytes in pleural fluid have been considered part of the diagnostic criteria for pleural TB; however, in many cases, neutrophils rather than lymphocytes are the predominant cell type in pleural effusions, making diagnosis more complicated [\u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e7\u003c/span\u003e]. Combining ADA and Lymphocyte percentage (LYM %) could improve diagnostic performance, and recent advances in statistical modeling enable assessment of their joint value [\u003cspan additionalcitationids=\"CR9 CR10 CR11 CR12 CR13 CR14 CR15 CR16 CR17 CR18 CR19 CR20 CR21\" citationid=\"CR8\" class=\"CitationRef\"\u003e8\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR22\" class=\"CitationRef\"\u003e22\u003c/span\u003e]. This study aimed to rigorously evaluate the utility of machine learning models of ADA, LYM%, and other basic indicators of pleural effusion for the diagnosis of TPE.\u003c/p\u003e"},{"header":"2. Methods","content":"\u003cp\u003eWe collected information on a total of 1134 patients with pleural effusion diagnosed in The fourth people's Hospital of Ningxia Hui Autonomous region and Zhejiang Provincial People's Hospital between January 1, 2021 and July 15, 2025. The cohort included 615 patients with TPE and 519 with non-TPE, comprising hypoproteinemia-related effusions, malignant effusions, parapneumonic effusions, and other causes (Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e). The diagnosis of TPE was established based on positive mycobacterial culture from pleural fluid or biopsy, caseous granulomas on pleural biopsy, pleural effusion smear acid-fast staining, nucleic acid amplification detection technology, etc. to detect positive Mycobacterium tuberculosis, or a clinical presentation highly consistent with TPE with documented response to anti-tuberculosis therapy. All other diagnoses were confirmed through standard clinical, radiological, and pathological criteria.\u003c/p\u003e\u003cp\u003eFor each patient, the following 9 pleural fluid laboratory parameters were collected: Rivalta Test, nucleated cell count/\u0026micro;L, LYM %, red blood cell count (RBC)/\u0026micro;L, ADA (U/L), glucose (mmol/L), chloride (mmol/L), lactate dehydrogenase (LDH) (U/L), and protein (g/L). The study protocol was approved by the institutional review board (Approval No. The fourth people's Hospital of Ningxia Hui Autonomous region Ethics 2024-QSY-022), and the requirement for informed consent was waived due to the retrospective nature of the analysis.\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab1\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003eBaseline Characteristics of TPE and Non-TPE Patient Cohorts.\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"7\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c6\" colnum=\"6\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c7\" colnum=\"7\"\u003e\u003c/div\u003e\u003cthead\u003e\u003ctr\u003e\u003cth align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eFeature\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003eTPE Group (n\u0026thinsp;=\u0026thinsp;615)\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c6\"\u003e\u003cp\u003eNon-TPE Group (n\u0026thinsp;=\u0026thinsp;519)\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c7\"\u003e\u0026nbsp;\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003cth align=\"left\" colspan=\"7\" nameend=\"c7\" namest=\"c1\"\u003e\u003cp\u003eDemographics\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eAge (Median (IQR))\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003e62(37, 76)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e74(59, 81)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eSex (Male, n (%))\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003e424 (68.9%)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e323 (62.2%)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e0.037\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"7\" nameend=\"c7\" namest=\"c1\"\u003e\u003cp\u003e\u003cb\u003eCategorical (n (%))\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\" morerows=\"2\" rowspan=\"3\"\u003e\u003cp\u003eRivalta test\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e+\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c4\" namest=\"c3\"\u003e\u003cp\u003e489 (79.5)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c6\" namest=\"c5\"\u003e\u003cp\u003e231 (44.5)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c4\" namest=\"c3\"\u003e\u003cp\u003e94 (15.3)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c6\" namest=\"c5\"\u003e\u003cp\u003e227 (43.7)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u0026plusmn;\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c4\" namest=\"c3\"\u003e\u003cp\u003e32 (5.2)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c6\" namest=\"c5\"\u003e\u003cp\u003e61 (11.8)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"7\" nameend=\"c7\" namest=\"c1\"\u003e\u003cp\u003e\u003cb\u003eNumeric (Median (IQR))\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eNucleated cell count/\u0026micro;L\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003e1719 (769, 3234)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e459 (160, 1583)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eLymphocyte %\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003e90 (81.5, 93.0)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e36(16.0, 50.0)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eRBC/\u0026micro;L\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003e3000 (1000, 7000)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e2000 (575, 6760)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e0.003\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eAdenosine deaminase\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003e33.7 (14.3, 50.8)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e7.1 (3.9, 13.8)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eGlucose\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003e5.98 (4.71, 7.25)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e7.06 (5.71, 8.84)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eChloride\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003e101.2 (98.3, 104.1)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e102.7 (99.3, 106.9)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eLDH\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003e349.0 (176.7, 619.2)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e143.0 (89.5, 310.0)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"3\" nameend=\"c3\" namest=\"c1\"\u003e\u003cp\u003eProtein\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c5\" namest=\"c4\"\u003e\u003cp\u003e44.2 (34.8, 50.4)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e27.1 (18.2, 39.0)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e\u0026lt;\u0026thinsp;0.001\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\u003cp\u003eMedian (Interquartile Range, IQR), or n (%). P-values calculated using Mann-Whitney U test\u003c/p\u003e\u003cp\u003ePrior to model training, the raw data underwent several preprocessing steps to ensure data quality and prepare it for machine learning algorithms. Column names were cleaned by removing leading and trailing whitespace. The 'Rivalta Test' feature, which contained categorical values ('+', '-', '\u0026plusmn;'), was mapped to numerical values: '+' to 1, '-' to 0, and '\u0026plusmn;' to 0.5. No explicit missing value imputation or outlier treatment was performed based on the initial data inspection which showed no missing values and the robust nature of tree-based models to outliers. Numerical features were scaled using StandardScaler to have zero mean and unit variance, which is crucial for distance-based models like SVM and KNN, and can also benefit regularization in Logistic Regression. Categorical features were transformed using OneHotEncoder to convert them into a numerical format suitable for machine learning algorithms, with handle_unknown='ignore' to manage potential unseen categories during prediction.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eThe entire dataset (N\u0026thinsp;=\u0026thinsp;1134) was randomly partitioned into a training set (70%, n\u0026thinsp;=\u0026thinsp;793), a validation set (15%, n\u0026thinsp;=\u0026thinsp;170), and a final, unseen test set (15%, n\u0026thinsp;=\u0026thinsp;171). The partitioning was stratified by the diagnosis to maintain the class balance.\u003c/p\u003e\u003cp\u003eFour machine learning algorithms were selected: Logistic Regression, Support Vector Machine (SVM), Random Forest, and Light Gradient Boosting Machine.\u003c/p\u003e\u003cp\u003eThe primary metric for model evaluation was the Area Under the Receiver Operating Characteristic Curve (AUC). To determine the statistical significance of the performance difference between ML models and ADA, LYM %, and ADA\u0026thinsp;+\u0026thinsp;LYM %, we compared their prediction scores on the test set using the DeLong test. A two-sided p-value less than 0.05 was considered statistically significant. Feature importance scores were extracted from the best-performing model to quantify the contribution of each laboratory parameter. All analyses and modeling were performed in Python 3.10 using Google Colaboratory (Google, Mountain View, CA, USA). The following packages and versions were used: scikit-learn 1.3.0, lightgbm 3.3.5, numpy 1.24.3, pandas 1.5.3, matplotlib 3.7.1, seaborn 0.12.2, and statsmodels 0.14.0.\u003c/p\u003e"},{"header":"3. Results","content":"\u003cdiv id=\"Sec4\" class=\"Section2\"\u003e\u003ch2\u003e3.1. Baseline Characteristics and Exploratory Analysis\u003c/h2\u003e\u003cp\u003eTable\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e summarizes the pleural fluid parameters for TPE and non-TPE groups. Compared to the non-TPE group, patients with TPE had significantly higher levels of nucleated cell count, LYM%, ADA, LDH, and protein, and lower levels of glucose and chloride (all p\u0026thinsp;\u0026lt;\u0026thinsp;0.05). Among these, ADA and LYM% demonstrated the most notable group separation (Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e). Red blood cell count also showed a statistically significant difference, although the effect size was smaller (p\u0026thinsp;=\u0026thinsp;0.003).\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec5\" class=\"Section2\"\u003e\u003ch2\u003e3.2. Diagnostic Performance of Machine Learning Models\u003c/h2\u003e\u003cp\u003eEvaluation on the independent test set demonstrated that machine learning models using the full feature set (Logistic Regression, SVM, Random Forest, LightGBM) generally exhibited higher diagnostic accuracy compared to baseline models using only single markers (ADA or Lymphocyte %).\u003c/p\u003e\u003cp\u003eAUC Performance: The full-feature models consistently showed high AUC values (ranging from 0.934 for Logistic Regression to 0.946 for Random Forest), significantly outperforming the ADA-only model (AUC\u0026thinsp;=\u0026thinsp;0.815) and the Lymphocyte %-only model (AUC\u0026thinsp;=\u0026thinsp;0.905). The baseline model using the combination of ADA\u0026thinsp;+\u0026thinsp;Lymphocyte % (AUC\u0026thinsp;=\u0026thinsp;0.928) also performed well, approaching the performance of the full-feature models.\u003c/p\u003e\u003cp\u003eOther Performance Metrics: At the optimal probability cutoff, full-feature models also generally surpassed single-marker baseline models in metrics such as Accuracy, Sensitivity, Specificity, Precision, and F1-score. For example, the Random Forest model achieved an accuracy of 0.877, sensitivity of 0.871, and specificity of 0.885 on the test set (Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003e, Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003e, Table\u0026nbsp;\u003cspan refid=\"Tab2\" class=\"InternalRef\"\u003e2\u003c/span\u003e).\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab2\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 2\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003ePerformance Metrics on Test Set (at Optimal Cutoff):\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"8\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c6\" colnum=\"6\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c7\" colnum=\"7\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c8\" colnum=\"8\"\u003e\u003c/div\u003e\u003cthead\u003e\u003ctr\u003e\u003cth align=\"left\" colname=\"c1\"\u003e\u003cp\u003eModel\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c2\"\u003e\u003cp\u003eAUC\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c3\"\u003e\u003cp\u003eOptimal Cutoff\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c4\"\u003e\u003cp\u003eAccuracy\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c5\"\u003e\u003cp\u003eSensitivity\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c6\"\u003e\u003cp\u003eSpecificity\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c7\"\u003e\u003cp\u003ePrecision\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c8\"\u003e\u003cp\u003eF1-score\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eLR\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.934\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.603\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.871\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.86\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e0.885\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e0.899\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e0.879\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eSVM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.945\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.534\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.883\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.871\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e0.897\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e0.91\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e0.89\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eRF\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.946\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.46\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.877\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.871\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e0.885\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e0.9\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e0.885\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eLightGBM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.945\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.724\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.883\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.86\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e0.91\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e0.92\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e0.889\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eADA (LR)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.815\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.446\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.76\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.796\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e0.718\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e0.771\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e0.783\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eLYM% (LR)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.905\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.444\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.854\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.903\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e0.795\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e0.84\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e0.87\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eADA\u0026thinsp;+\u0026thinsp;LYM%(LR)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.928\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.795\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.854\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.785\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e0.936\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e0.936\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e0.854\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\u003cp\u003eADA, adenosine deaminase; AUC, area under the receiver operating characteristic curve; LR, logistic regression; LYM%, lymphocyte percentage; RF, random forest; SVM, Support Vector Machine.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec6\" class=\"Section2\"\u003e\u003ch2\u003e3.3. Feature Importance Analysis\u003c/h2\u003e\u003cp\u003eFeature importance analysis conducted on the best-performing model (Random Forest) confirmed Lymphocyte % and ADA as the most important predictors, while also revealing the contribution of other parameters like Protein, LDH, and Nucleated cell count to the model's diagnosis. This supports the value of a comprehensive analysis of multiple laboratory parameters (Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e).\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec7\" class=\"Section2\"\u003e\u003ch2\u003e3.4. DeLong Test for AUC Comparison\u003c/h2\u003e\u003cp\u003eDeLong's test results further confirmed that the AUC of the full-feature model (Random Forest) on the test set was statistically significantly higher than that of the ADA-only (p\u0026thinsp;=\u0026thinsp;0.0000) and Lymphocyte %-only (p\u0026thinsp;=\u0026thinsp;0.0376) models. However, the AUC difference between the full-feature model and the model using the ADA\u0026thinsp;+\u0026thinsp;Lymphocyte % combination was not statistically significant (p\u0026thinsp;=\u0026thinsp;0.1669). This indicates that while the combination of ADA and Lymphocyte % captures much of the important diagnostic information, adding more features provides additional (though not statistically significant in this dataset) gain (Table\u0026nbsp;\u003cspan refid=\"Tab3\" class=\"InternalRef\"\u003e3\u003c/span\u003e).\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab3\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 3\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003eComparison AUC of Random Forest AUC of Comparator DeLong's Test p-value Statistically Significant (p\u0026thinsp;\u0026lt;\u0026thinsp;0.05)\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"5\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e\u003cthead\u003e\u003ctr\u003e\u003cth align=\"left\" colname=\"c1\"\u003e\u003cp\u003eComparison\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c2\"\u003e\u003cp\u003eAUC1\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c3\"\u003e\u003cp\u003eAUC2\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c4\"\u003e\u003cp\u003ep-value\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c5\"\u003e\u003cp\u003eSignificant\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eRandom Forest vs. ADA (LR)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.946\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.815\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.0000\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003eYes\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eRandom Forest vs. LYM%(LR)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.946\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.905\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.0376\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003eYes\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eRandom Forest vs. ADA\u0026thinsp;+\u0026thinsp;LYM% (LR)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.946\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.928\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.1669\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003eNo\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eLYM % (LR) vs. ADA (LR)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.905\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.815\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.0322\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003eYes\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eADA\u0026thinsp;+\u0026thinsp;LYM%(LR) vs. ADA (LR)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.928\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.815\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.0005\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003eYes\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eADA\u0026thinsp;+\u0026thinsp;LYM%(LR) vs. LYM% (LR)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e0.928\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.905\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.0748\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003eNo\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec8\" class=\"Section2\"\u003e\u003ch2\u003e3.5. Predicted Probability Distribution\u003c/h2\u003e\u003cp\u003eDecision Curve Analysis demonstrated that the full-feature model (Random Forest) and the ADA\u0026thinsp;+\u0026thinsp;Lymphocyte % combination model provided a higher net benefit than \"treat all\" or \"treat none\" strategies across most clinically relevant risk thresholds (approximately 0.1 to 0.8). This suggests the potential clinical utility of these models in guiding treatment decisions (Fig.\u0026nbsp;\u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e6\u003c/span\u003e).\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec9\" class=\"Section2\"\u003e\u003ch2\u003e3.6. Optimal Cutoff Corresponding Feature Values:\u003c/h2\u003e\u003cp\u003eFor the single-feature baseline models, we calculated the original feature values corresponding to their optimal probability cutoffs:\u003c/p\u003e\u003cp\u003eThe optimal cutoff probability of 0.446 for the \"Only ADA (LR)\" model corresponds to an ADA value of approximately 13.80 U/L.\u003c/p\u003e\u003cp\u003eThe optimal cutoff probability of 0.444 for the \"Only Lymphocyte % (LR)\" model corresponds to a Lymphocyte % value of approximately 52.53%. These values provide data-driven optimal discrimination thresholds, which differ from the commonly used empirical cutoffs like ADA 40 U/L or Lymphocyte % 50% in clinical practice.\u003c/p\u003e\u003c/div\u003e"},{"header":"4. Discussion","content":"\u003cp\u003eThe findings of this study reinforce and extend the current understanding of TPE diagnosis. While the Infectious Diseases Society of America (IDSA) guidelines recommend the use of ADA for the diagnosis of TPE [\u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e23\u003c/span\u003e], and use 40 U/L as a threshold for initiating anti-TB treatment [\u003cspan citationid=\"CR24\" class=\"CitationRef\"\u003e24\u003c/span\u003e], our data show that its diagnostic utility is limited when used alone. As demonstrated in this study, more than half of TPE patients had pleural fluid ADA levels below 40 U/L, highlighting the limitations of pleural fluid ADA as a single diagnostic marker [\u003cspan citationid=\"CR10\" class=\"CitationRef\"\u003e10\u003c/span\u003e]. This finding is consistent with recent studies questioning the reliability of ADA thresholds, particularly in elderly or critically ill patients. In other studies, the proportion of low ADA is usually not as high, but it is also a common occurrence [\u003cspan citationid=\"CR25\" class=\"CitationRef\"\u003e25\u003c/span\u003e].\u003c/p\u003e\u003cp\u003eImportantly, we found that the diagnostic performance of a logistic regression model based on LYM% alone was better than that of ADA, with a higher AUC and sensitivity. This novel observation highlights the strong discriminatory power of LYM% in our dataset, which has not been reported in prior studies. Our study also revealed that a simple logistic regression model combining ADA and LYM% yielded diagnostic performance comparable to that of more complex machine learning models, including RF, LightGBM, and SVM.\u003c/p\u003e\u003cp\u003eOur models were able to effectively leverage the combined power of several pleural fluid parameters. The initial data exploration revealed distinct differences in several key laboratory parameters between TPE and non-TPE cases, including Rivalta Test, nucleated cell count, LYM %, RBC, ADA, glucose, chloride, LDH, and protein. These observed differences are consistent with the known pathophysiology of TPE, as pleural effusions from patients with tuberculosis are often dominated by a Th1 cell immune response, which explains the high lymphocyte counts and elevated activity of ADA, a purine-degrading enzyme found primarily in T lymphocytes [\u003cspan citationid=\"CR26\" class=\"CitationRef\"\u003e26\u003c/span\u003e]. However, up to 10% of TPE patients may have a neutrophil-predominant cell population [\u003cspan citationid=\"CR27\" class=\"CitationRef\"\u003e27\u003c/span\u003e]. TPE also typically presents with higher nucleated cells, red blood cells, protein, and LDH, and lower glucose and chloride concentrations compared to non-TPE, which is consistent with some studies [\u003cspan additionalcitationids=\"CR29\" citationid=\"CR28\" class=\"CitationRef\"\u003e28\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR30\" class=\"CitationRef\"\u003e30\u003c/span\u003e]. The Random Forest model identified LYM%, ADA, and protein as the top features, aligning with this pathophysiological profile of a lymphocyte-dominant exudate. This multivariable pattern recognition enabled superior discrimination of TPE versus non-TPE compared to single-marker models. The consistently high AUC scores (above 0.93) achieved by all models (RF, LR, SVM, and LightGBM) on the independent test set underscore their excellent ability to differentiate between TPE and non-TPE effusions across various probability thresholds. This high performance suggests that the combined information from these markers provides a more comprehensive diagnostic signature than any single marker.\u003c/p\u003e\u003cp\u003eThis study has several strengths. First, it utilized a dataset that included common and easily accessible pleural effusion laboratory parameters, making the developed model potentially applicable in a variety of clinical settings. Second, the rigorous methodology used, including a clear partitioning of the data into training, validation, and test sets, helped ensure that the reported performance metrics provided unbiased estimates of the model's generalization ability. Hyperparameter tuning combined with cross-validation further enhanced the model's robustness and prevented overfitting. Third, the evaluation was comprehensive, using multiple relevant metrics (AUC, accuracy, precision, recall, F1 score) to fully demonstrate the model's performance. Finally, formal statistical comparisons using the DeLong test provided strong evidence of the superior discriminative ability of the developed model compared to the ADA.\u003c/p\u003e\u003cp\u003eDespite these strengths, this study has limitations. The dataset, although comprehensive in terms of parameters, originates from two centers in China. The performance of the models might vary when applied to data from different populations or clinical settings, highlighting the need for external validation on geographically diverse cohorts. The dataset size, while sufficient for model training in this study, could be expanded to further improve model generalization and capture more rare variations. Although a diverse set of machine learning models was explored, other advanced techniques could potentially yield further improvements. The engineered features were based on simple interactions and polynomials; more complex feature engineering or automated feature learning methods might uncover additional predictive patterns. Finally, while ADA and LYM% appear sufficient for high diagnostic performance, further investigation into combining them with additional novel biomarkers (e.g., IL-27 or IFN-γ) may further improve diagnostic accuracy.\u003c/p\u003e\u003cp\u003eThe findings of this study have significant clinical implications. A highly accurate diagnostic model for TPE could lead to faster and more confident diagnoses, potentially reducing the time to initiation of appropriate anti-tuberculosis therapy. This could, in turn, minimize the risk of developing severe complications like constrictive pericarditis, which often requires complex surgical intervention and is associated with significant morbidity and mortality. Our study supports the routine clinical use of ADA and LYM% in combination for diagnosing TPE. A simple logistic model based on these two parameters performs comparably to advanced machine learning algorithms, offering an interpretable and cost-effective solution for frontline diagnosis. Such a tool could assist clinicians in interpreting complex laboratory profiles and making more informed decisions regarding patient management, potentially reducing the need for more invasive diagnostic procedures in certain cases.\u003c/p\u003e\u003cp\u003eBuilding upon these findings, future research should focus on several key areas. External validation of the developed models on independent datasets from diverse geographic locations and patient populations is crucial to confirm their generalizability. Including additional clinical data, such as patient demographics, comorbidities, symptoms, and imaging findings (e.g., echocardiography characteristics), could further improve model performance and provide a more holistic diagnostic tool. Exploring other advanced machine learning techniques, such as deep learning or more sophisticated ensemble methods, might also yield further improvements. Ultimately, the development of a user-friendly clinical tool incorporating these models could facilitate their practical application at the point of care. Further studies could also investigate the cost-effectiveness of implementing such a machine learning-based diagnostic approach compared to current clinical practice.\u003c/p\u003e"},{"header":"5. Conclusions","content":"\u003cp\u003eIn this study, we successfully developed and evaluated machine learning models for the diagnosis of tuberculous pleural effusion (TPE) using comprehensive pleural effusion parameters and engineered features. The results showed that incorporating multiple laboratory parameters through machine learning significantly improved diagnostic performance compared with relying solely on ADA (LR), LYM % (LR), and ADA\u0026thinsp;+\u0026thinsp;LYM % (LR), as confirmed by the statistically significant difference in AUC of the DeLong test. The developed models, especially random forest, logistic regression, and support vector machine, achieved high accuracy and discrimination on an independent test set. These findings suggest that machine learning-based methods have the potential to be an effective tool to help clinicians diagnose TPE in a timely and accurate manner, which may improve patient outcomes and reduce complications. To promote the clinical translation of these models, further validation on external datasets and exploration of more features are necessary.\u003c/p\u003e"},{"header":"Abbreviations","content":"\u003ctable border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"524\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eADA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003eadenosine deaminase\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eAUC\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003earea under the receiver operating characteristic curve\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eLDH\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003elactate dehydrogenase\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eLR\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003elogistic regression\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eLYM%\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003elymphocyte percentage\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eML\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003emachine learning\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eROC\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003eReceiver Operating Characteristic\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eRF\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003erandom forest\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eSVM\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003eSupport Vector Machine\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eTPE\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003etuberculous pleural effusion\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 11.8547%;\"\u003e\n \u003cp\u003eLightGBM\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 88.1453%;\"\u003e\n \u003cp\u003elight gradient boosting machine\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e"},{"header":"Declarations","content":"\u003cp\u003e\u003cstrong\u003eTrial registration:\u003c/strong\u003e Not applicable. This retrospective diagnostic study was not registered as a clinical trial.\u003cstrong\u003e\u0026nbsp;\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eEthics approval and consent to participate:\u0026nbsp;\u003c/strong\u003eThis study was conducted in accordance with the Declaration of Helsinki and was approved by the Institutional Review Board of The Fourth People\u0026rsquo;s Hospital of Ningxia Hui Autonomous Region (approval No. 2024-QSY-022). The requirement for informed consent was waived due to the retrospective design.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConsent for publication:\u003c/strong\u003e Not applicable. The requirement for informed consent for publication was waived due to the retrospective nature of the study. All authors have read and approved the final manuscript and consent to its publication.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAvailability of data and materials:\u003c/strong\u003e The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCompeting Interests:\u003c/strong\u003e The authors declare that they have no competing interests.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eFunding:\u003c/strong\u003e This research was funded by the \u0026ldquo;Youth Science and Technology Cultivational Project of Ningxia Hui Autonomous Region Health Commission:2024-NWQP-B049\u0026rdquo;. \u003cstrong\u003e\u0026nbsp;\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAuthor Contributions:\u003c/strong\u003e Conceptualization, Xiaomei Hai and Bofei Liu.; methodology, Xiaomei Hai.; software, Xiangjun Ye; validation, Xiaomei Hai, Bofei Liu and Yuankui Chu.; formal analysis, Yuankui Chu.; investigation, Xiaomei Hai.; resources, Sujie Zheng, Guoren Ma, Jing Liu, Meng Hao , Tao Liu.; data curation, Xiuqin Chang.; writing\u0026mdash;original draft preparation, Xiaomei Hai.; writing\u0026mdash;review and editing, Xiangjun Ye.; visualization, Xiangjun Ye.; supervision, Xiaomei Hai; project administration, Xiaomei Hai.; funding acquisition, Xiaomei Hai. All authors have read and agreed to the published version of the manuscript.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAcknowledgments:\u003c/strong\u003e The authors thank the staff of the participating hospitals for their assistance with data collection.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\u003cli\u003e\u003cspan\u003eJany B, Welte T. Pleural Effusion in Adults\u0026mdash;Etiology, Diagnosis, and Treatment. Dtsch Arztebl Int. 2019;116(21):377\u0026ndash;86.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eShaw JA, Koegelenberg CFN. Tuberculous pleural effusion. Respirology. 2021;26(1):44\u0026ndash;57.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eVorster MJ, Allwood BW, Diacon AH. Tuberculous pleural effusions: advances and controversies. J Thorac Dis. 2015;7(6):981\u0026ndash;91.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eZhai K, Lu Y, Shi HZ. Tuberculous pleural effusion. J Thorac Dis. 2016;8(7):E486\u0026ndash;94.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLiang QL, Shi HZ, Wang K, Qin SM, Qin XJ. Diagnostic accuracy of adenosine deaminase in tuberculous pleurisy: a meta-analysis. Respir Med. 2008;102(5):744\u0026ndash;54.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eShaw JA, Diacon AH, Koegelenberg CFN. Tuberculous pleural effusion. Respirology. 2019;24(10):962\u0026ndash;71.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eChoi H, Chon HR, Kim K, et al. Clinical and laboratory differences between lymphocyte- and neutrophil-predominant pleural tuberculosis. PLoS ONE. 2016;11:e0165428.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eGarcia-Zamalloa A, Taboada-Gomez J. Diagnostic accuracy of adenosine deaminase and lymphocyte proportion in pleural fluid for tuberculous pleurisy in different prevalence scenarios. PLoS ONE. 2012;7(6):e38729.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eChen QY, Yin SM, Shao MM, Yi FS, Shi HZ. Machine learning-based Diagnostic model for determining the etiology of pleural effusion using Age, ADA and LDH. Respir Res. 2025;26(1):170.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eRen Z, Hu Y, Xu L. Identifying tuberculous pleural effusion using artificial intelligence machine learning algorithms. Respir Res. 2019;20:220.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eJang H, Lee Chang\u0026ndash;Min, Choi N, Park HJ, Park, et al. Classification of pleural effusions using deep learning visual models: contrastive\u0026ndash;loss. Sci Rep. 2022;12:5532.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eZhang Q, Zhao D, Hou L, Heidari AA, Chen Y, Liu L, Chen H, Li C. An enhanced machine learning framework for accurate diagnosis of tuberculous pleural effusion. J Big Data. 2025;12:75.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eWu C, Liu W, Mei P, Liu Y, Cai J, Liu L, Wang J, Ling X, Wang M, Cheng Y, He M, He Q, He Q, Yuan X, Tong J. The large language model diagnoses tuberculous pleural effusion in pleural effusion patients through clinical feature landscapes. Respir Res. 2025;26(1):52.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLi C, Hou L, Sharma BY, et al. Developing a new intelligent system for the diagnosis of tuberculous pleural effusion. Comput Methods Programs Biomed. 2018;153:211\u0026ndash;25.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLiu Y, Liang Z, Yang J, Yuan S, Wang S, Huang W, et al. Diagnostic and comparative performance for the prediction of tuberculous pleural effusion using machine learning algorithms. Int J Med Inf. 2024;182:105320.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eGarcia-Zamalloa A, Vicente D, Arnay R, Arrospide A, Taboada J, Castilla-Rodriguez I, et al. Diagnostic accuracy of adenosine deaminase for pleural tuberculosis in a low prevalence setting: A machine learning approach within a 7-year prospective multi-center study. PLoS ONE. 2021;16(11):e0259203.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLi C, Hou L, Sharma BY, Li H, Chen C, Li Y, Zhao X, Huang H, Cai Z, Chen H. Developing a new intelligent system for the diagnosis of tuberculous pleural effusion. Comput Methods Programs Biomed. 2018;153:211\u0026ndash;25.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eZhang Q, Zhao D, Hou L, Heidari AA, Chen Y, Liu L, Chen H, Li C. (2025). An enhanced machine learning framework for accurate diagnosis of tuberculous pleural effusion. Journal of Big Data, 2025, 12(1): 75.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLiu S, Yang Y, Wang D, et al. 1 Development and Validation of a Prediction Model Based on a Nomogram for Tuberculous Pleural Effusion[J]. Front Med. 2025;12:1589406.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eZhou X, Chen Y, Gui W, et al. Enhanced differential evolution algorithm for feature selection in tuberculous pleural effusion clinical characteristics analysis. Artif Intell Med. 2024;153:102886.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eHuyen PT, Li M, Li L, et al. Exploring the value of pleural fluid biomarkers for complementary pleural effusion disease examination. Comput Biol Chem. 2021;94:107559.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eWei TT, Zhang JF, Cheng Z, et al. Development and validation of a machine learning model for differential diagnosis of malignant pleural effusion using routine laboratory data. Ther Adv Respir Dis. 2023;17:17534666231208632.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLewinsohn DM, Leonard MK, LoBue PA, Cohn DL, Daley CL, Desmond E, et al. Official American thoracic society/infectious Diseases society of America/centers for disease control and prevention clinical practice guidelines: diagnosis of tuberculosis in adults and children. Clin Infect Dis. 2017;64(2):111\u0026ndash;5.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eKaewwinud J, Pienchitlertkajorn S, Koomtanapat K, Lumkul L, Wongyikul P, Phinyo P. Diagnostic scoring systems for tuberculous pleural effusion in patients with lymphocyte-predominant exudative pleural profile: A development study. Heliyon. 2024;10(1):e23440.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eKim SB, Shin B, Lee JH, et al. Pleural fluid ADA activity in tuberculous pleurisy can be low in elderly, critically ill patients with multi-organ failure. BMC Pulm Med. 2020;20(1):13.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eda Cunha Lisboa V, Ribeiro-Alves M, da Silva Corr\u0026ecirc;a R, Ramos Lopes I, Mafort TT, Santos AP, Porto Amadeu T, Rufino R, Silva Rodrigues L. Predominance of Th1 Immune Response in Pleural Effusion of Patients with Tucerculosis among Other Exudative Etiologies. J Clin Microbiol. 2019;58. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1128/jcm.00927\u0026thinsp;\u0026ndash;\u0026thinsp;19\u003c/span\u003e\u003cspan address=\"10.1128/jcm.00927\u0026thinsp;\u0026ndash;\u0026thinsp;19\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eZhao T, Chen B, Xu Y, Qu Y. Clinical and pathological differences between polymorphonuclear-rich and lymphocyte-rich tuberculous pleural effusion. Ann Thorac Med. 2020;15(2):76\u0026ndash;83.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLee J, Lim JK, Yoo SS, Lee SY, Cha SI, Park JY, Kim CH. Different characteristics of tuberculous pleural effusion according to pleural fluid cellular predominance and loculation. J Thorac Dis. 2016;8(8):1935\u0026ndash;42.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eZhao T, Zhang J, Zhang X, Wang C. Clinical significance of pleural fluid lactate dehydrogenase/adenosine deaminase ratio in the diagnosis of tuberculous pleural effusion. BMC Pulm Med. 2024;24(1):241.\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eDarooei R, Sanadgol G, Gh-Nataj A, Almasnia M, Darivishi A, Eslaminejad A, et al. Discriminating Tuberculous Pleural Effusion from Malignant Pleural Effusion Based on Routine Pleural Fluid Biomarkers, Using Mathematical Methods. Tanaffos. 2017;16(2):157\u0026ndash;65.\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Tuberculous Pleural Effusion, ADA, Lymphocyte Percentage, machine learning, Random Forest, Logistic Regression, Light Gradient Boosting Machine, Support Vector Machine, ROC Curve, DeLong Test, Decision Curve Analysis","lastPublishedDoi":"10.21203/rs.3.rs-7278771/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7278771/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003ch2\u003eBackground\u003c/h2\u003e\u003cp\u003eBackground: Diagnosing tuberculous pleural effusion (TPE) is often complicated by overlapping features with other causes of pleural effusion. Adenosine deaminase (ADA) and lymphocyte percentage (LYM%) are widely used biomarkers, but their isolated diagnostic value remains limited.\u003c/p\u003e\u003ch2\u003eMethods\u003c/h2\u003e\u003cp\u003eWe retrospectively enrolled 1134 patients with confirmed pleural effusion (615 TPE, 519 non-TPE) from two Chinese hospitals between 2021 and 2025. Nine pleural fluid parameters were analyzed. The dataset was divided into training (70%), validation (15%), and test (15%) sets. We developed four machine learning (ML) models\u0026mdash;logistic regression (LR), random forest (RF), Light Gradient Boosting Machine (LightGBM), and support vector machine (SVM)\u0026mdash;and compared their diagnostic performance to logistic models based on ADA alone, LYM% alone, and their combination. The DeLong test was used to compare AUCs.\u003c/p\u003e\u003ch2\u003eResults\u003c/h2\u003e\u003cp\u003eAll pleural fluid parameters, including red blood cells, significantly differed between the TPE and non-TPE groups (p\u0026thinsp;\u0026lt;\u0026thinsp;0.05). The RF model achieved the highest AUC (0.946), followed by LightGBM (0.945), SVM (0.945), and LR (0.934). ADA\u0026thinsp;+\u0026thinsp;LYM% (AUC\u0026thinsp;=\u0026thinsp;0.928) outperformed ADA alone (0.815) and LYM% alone (0.905), and showed no significant difference from the full-feature RF model (p\u0026thinsp;=\u0026thinsp;0.181). Both ADA and LYM% were strong positive predictors in all models.\u003c/p\u003e\u003ch2\u003eConclusions\u003c/h2\u003e\u003cp\u003eA minimal logistic model based on ADA and LYM% demonstrates excellent diagnostic performance for TPE, comparable to more complex machine learning models. This simple and interpretable approach is well-suited for routine clinical application.\u003c/p\u003e\u003ch2\u003eTrial registration\u003c/h2\u003e\u003cp\u003eNot applicable. This retrospective diagnostic study was not registered as a clinical trial.\u003c/p\u003e","manuscriptTitle":"Simplifying the Diagnosis of Tuberculous Pleural Effusion: A Machine Learning Analysis of ADA and Lymphocyte Percentage in 1134 Patients","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-09-30 07:17:55","doi":"10.21203/rs.3.rs-7278771/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"428f2409-a070-480c-8e6f-ffbb9741d372","owner":[],"postedDate":"September 30th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[],"tags":[],"updatedAt":"2026-04-01T08:57:40+00:00","versionOfRecord":[],"versionCreatedAt":"2025-09-30 07:17:55","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-7278771","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7278771","identity":"rs-7278771","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2025) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00