Accepted for/Published in: JMIR Medical Informatics
Date Submitted: Mar 26, 2025
Date Accepted: Aug 11, 2025
Machine Learning and SHAP value integration for Predicting the Prognostic of Anti-NMDAR Encephalitis: Model Development and Evaluation Study
ABSTRACT
Background:
Anti-N-methyl-D-aspartate receptor (NMDAR) encephalitis is a rare disease with no Accurate prognostic tools to predict the prognosis of patients.
Objective:
We aimed to develop an interpretable machine learning (ML) model using real-world clinical data to guide personalized therapeutic strategies.
Methods:
his retrospective cohort study analyzed 140 patients with NMDAR encephalitis treated at the Third Affiliated Hospital of Sun Yat-sen University (2015-2024). Feature selection using Recursive Feature Elimination (RFE). The model was constructed by three machine learning algorithms, Decision Tree t(DT), Random Forest(RF) and XGBoost. MSE (mean square error), RMSE (root mean square error), R² (coefficient of determination), MAE (mean absolute error), and MAPE (mean absolute percentage error) were used to evaluate the model performance. Finally, the optimal model was interpreted via SHapley Additive exPlanations (SHAP) and deployed as a web application using Flask framework
Results:
The median age of patients with anti-NMDA encephalitis was 23 years old. The median CASE score at acute onset was 11. After preprocessing, the ML model selects 20 features including 4 demographic characteristics ,3 Clinical characteristics, 11 laboratory parameters and 2 neuroimaging characteristics. RF demonstrated superior accuracy in predicting the prognosis (MSE: 11.01; RMSE: 3.32; R²: 0.71; MAE:2.49; MAPE: 0.48). SHAP analysis identified the Admission to ICU (mean |SHAP value|=1.65), Initial symptoms- Memory deficits (0.69), and UA (0.53) as the top important prognostic predictors.
Conclusions:
We developed and validated an interpretable RF -based prognostic model for NMDAR encephalitis. The web-deployed tool enables real-time risk stratification, facilitating clinical decision-making and personalized therapeutic interventions for clinicians.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.