Abstract
OBJECTIVE: Machine learning-based approaches were applied to explore prognostic risk factors for patients with tuberculous meningitis (TBM) and develop a risk prediction model for their 1-year post-treatment poor prognosis. METHODS: We enrolled 358 patients with TBM admitted to the Department of Neurology, 940th Hospital of the Joint Logistic Support Force of the Chinese People's Liberation Army, from January 2010 to February 2022. We retrospectively collected their clinical data, with 1-year post-treatment prognosis as the primary outcome measure. Enrolled patients were randomly divided into the training set and test set at a 7:3 ratio. Predictive models were established using logistic regression (LR), support vector machine (SVM), and random forest (RF) respectively, based on training set data. To evaluate the predictive efficacy of the established models, comparative assessments were performed for each model individually, including the receiver operating characteristic curve - area under the curve (ROC-AUC), calibration curve of predicted probabilities, decision curve analysis (DCA), as well as sensitivity and specificity. RESULTS: In the training set, the RF model exhibited optimal discriminatory ability and calibration performance, with an area under the ROC-AUC of 0.940 (95% confidence interval [Cl]: 0.912–0.968), a sensitivity of 0.783, a specificity of 0.928, a positive predictive value (PPV) of 0.806, and a negative predictive value (NPV) of 0.918. In the test set, the LR model had the ROC-AUC of 0.882 (95% Cl: 0.821–0.943), a sensitivity of 1.000, a specificity of 0.731, a PPV of 0.588, a NPV of 1.000, and a Brier score of 0.131. CONCLUSION: Machine learning-based prediction models can reliably predict the probability of 1-year post-treatment poor prognosis in TBM patients when using the optimal LR model. CLINICAL TRIAL NUMBER: Not applicable. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1186/s12879-026-13111-1.