To develop and validate an interpretable machine learning model for the preliminary risk stratification of viral encephalitis based on routine blood analysis.
Approach:
Key Findings:
The XGBoost model achieved an AUC of 0.949 (95% CI: 0.921 ~ 0.978) in the training set and 0.900 (95% CI: 0.801–1.000) in the test set.
Serum albumin and white blood cell counts, along with low neutrophil counts, were identified as significant predictors of viral encephalitis.
Interactions between serum albumin and white blood cell counts were also influential in predictions.
Interpretation:
Limitations:
The study is retrospective and conducted in a single tertiary hospital, which may limit generalizability.
Patients without cerebrospinal fluid testing were excluded, which may affect the diagnostic accuracy.