Machine learning models based on laboratory data: new insight into the differential diagnosis of tuberculous and
Xiaoyan Hao1, Yujiao Hu1, Lei Zhou1
1Department of Clinical Laboratory Medicine, Xijing Hospital, Fourth Military Medical University, Xi'an, China.
Background:
The differential diagnosis of tuberculous meningitis (TBM) and viral meningitis (VM) remains a formidable clinical challenge. This study aims to develop machine learning (ML) models and a nomogram for differentiating between TBM and VM.
Methods:
Clinical and laboratory data were collected from 558 participants, including 190 TBM patients and 368 VM patients, treated between 2000 and 2024 at Xijing Hospital. Resampling techniques were employed to balance the dataset. Four feature selection methods (RFECV-ADA, Boruta, Spearman, MI) were utilized to identify potential indicators. Two supervised ML algorithms were implemented for model development. Model performance was evaluated with the area under the curve, as well as sensitivity (SEN), specificity, accuracy, positive predictive value, and negative predictive value. The influence of each feature was visualized with SHapley Additive exPlanations (SHAP) diagrams. Finally, a nomogram was created from the selected features.
Results:
Ten features were identified, including the mean corpuscular volume, hemoglobin, D-Dimer level, cerebrospinal fluid (CSF) glucose, protein, immunoglobulin G, A, M, chloride, and albumin levels. The ENN-XgBoost_V10 model demonstrated the highest SEN of 75.79%, in differentiating TBM from VM and a SEN of 81.45% in patients with at least five leucocytes per μL of CSF and a CSF-to-blood glucose ratio less than 0.5. According to SHAP analysis, the significance of these features in prediction was underscored. Calibration curve analysis indicated that the nomogram predictions were relatively similar to the actual outcomes.
Conclusions:
Based on ten routine laboratory tests, the ENN-XgBoost_V10 model differentiates TBM from VM with superior SEN to traditional methods.
Related Concept Videos
Viral Meningitis
Bacterial Meningitis I: Introduction
Bacterial Meningitis II: Pathophysiology
Pulmonary Tuberculosis IV
Several diagnostic approaches are used to detect TB. The conventional method is the Tuberculin Skin Test (TST), also known as the Mantoux test. However, this method has...


