Abstract
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.