Ensemble Machine Learning Model for Real-Time Valproic Acid Prediction in Epilepsy Treatment - Xie, Jiangchuan; Ma, Pan; Pan, Xinmei; Cao, Liya; Liu, Ruixiang; Xiong, Lirong; Wang, Hongqian; Zhang, Xin; Xie, Linli; Chen, Yongchuan (Pharmacopsychiatry, 2025)
To develop an optimal model to predict valproic acid (VPA) concentrations by machine learning, ensuring that the VPA plasma concentration is in the effective treatment range, and thus effectively control the patient’s epilepsy.This single-center, retrospective study included patients diagnosed with epilepsy from January 2014 to January 2022. Patients receiving VPA and having undergone therapeutic drug monitoring were enrolled. Top three algorithms exhibiting superior model performance were selected to establish the ensemble prediction model, with Shapley Additive exPlanations (SHAP) employed for model interpretation. An independent dataset was collected as a clinical validation group to verify the prediction model performance.The algorithms chosen for the ensemble model—Light Gradient Boosting, Categorical Boosting, and Gradient Boosted Regression Trees—demonstrated high R2 (0.549, 0.515, and 0.503, respectively). Post-feature selection, the final model incorporated 20 variables, proving superior in predictive performance compared to models considering all 24 variables. The R2, mean absolute error, mean square error, absolute accuracy (±20 mg/L), and relative accuracy (±20%) of external validation were 0.621, 10.67, 221.50, 78.98%, and 66.48%, respectively. The importance and direction of each variable were visually represented using SHAP values, with VPA administration and liver function emerging as the most significant factors.The innovative application harnesses advanced multi-algorithm mining methodologies to forecast VPA concentrations in adult epileptic patients. Furthermore, it employs SHAP to elucidate the nuanced influence of each feature within the integrated prediction model, thereby providing a robust and plausible explanation for the determinants affecting VPA concentration predictions.
Keywords: valproic acid; machine learning; precision medicine; prediction model; model explanation