CC BY 4.0 · Pharmacopsychiatry
DOI: 10.1055/a-2593-3125
Original Paper

Ensemble Machine Learning Model for Real-Time Valproic Acid Prediction in Epilepsy Treatment

Jiangchuan Xie
1   Department of pharmacy, The First Affiliated Hospital of Army Medical University, Chongqing, China
,
Pan Ma
1   Department of pharmacy, The First Affiliated Hospital of Army Medical University, Chongqing, China
,
Xinmei Pan
1   Department of pharmacy, The First Affiliated Hospital of Army Medical University, Chongqing, China
,
Liya Cao
1   Department of pharmacy, The First Affiliated Hospital of Army Medical University, Chongqing, China
,
Ruixiang Liu
1   Department of pharmacy, The First Affiliated Hospital of Army Medical University, Chongqing, China
,
Lirong Xiong
1   Department of pharmacy, The First Affiliated Hospital of Army Medical University, Chongqing, China
,
Hongqian Wang
2   Medical Big Data and Artificial Intelligence Center, the First Affiliated Hospital of Army Medical University, Chongqing, China
,
Xin Zhang
1   Department of pharmacy, The First Affiliated Hospital of Army Medical University, Chongqing, China
,
Linli Xie#
1   Department of pharmacy, The First Affiliated Hospital of Army Medical University, Chongqing, China
2   Medical Big Data and Artificial Intelligence Center, the First Affiliated Hospital of Army Medical University, Chongqing, China
,
Yongchuan Chen#
1   Department of pharmacy, The First Affiliated Hospital of Army Medical University, Chongqing, China
› Institutsangaben

Abstract

Aims

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.

Methods

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.

Results

The algorithms chosen for the ensemble model—Light Gradient Boosting, Categorical Boosting, and Gradient Boosted Regression Trees—demonstrated high R 2 (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 R 2 , 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.

Conclusion

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.

These authors contributed equally to this work: Jiangchuan Xie, Pan Ma


# These authors are equal corresponding authors: Linli Xie, Yongchuan Chen


Supplementary Material



Publikationsverlauf

Eingereicht: 11. Juli 2024

Angenommen: 08. April 2025

Artikel online veröffentlicht:
02. Juni 2025

© 2025. The Author(s). This is an open access article published by Thieme under the terms of the Creative Commons Attribution License, permitting unrestricted use, distribution, and reproduction so long as the original work is properly cited. (https://creativecommons.org/licenses/by/4.0/).

Georg Thieme Verlag KG
Oswald-Hesse-Straße 50, 70469 Stuttgart, Germany

 
  • References

  • 1 Trinka E, Kwan P, Lee B. et al. Epilepsy in Asia: Disease burden, management barriers, and challenges. Epilepsia 2019; 60: 7-21
  • 2 Thijs RD, Surges R, O’Brien TJ. et al. Epilepsy in adults. Lancet 2019; 393: 689-701
  • 3 China Association Against Epilepsy. Clinical diagnosis and treatment guidelines-Epilepsy Volume[M]. People’s Health Publishing House. 2023
  • 4 Wirrell EC, Nabbout R, Scheffer IE. et al. Methodology for classification and definition of epilepsy syndromes with list of syndromes: Report of the ILAE Task Force on Nosology and Definitions. Epilepsia 2022; 63: 1333-1348
  • 5 Nanau RM, Neuman MG. Adverse drug reactions induced by valproic acid. Clin Biochem 2013; 46: 1323-1338
  • 6 Druschky K, Bleich S, Grohmann R. et al. Use and safety of antiepileptic drugs in psychiatric inpatients—data from the AMSP study. Eur Arch Psychiatry Clin Neurosci 2018; 268: 191-208
  • 7 Tseng YJ, Huang SY, Kuo CH. et al. Safety range of free valproic acid serum concentration in adult patients. PLoS One 2020; 15: e238201
  • 8 Tseng YJ, Huang SY, Kuo CH. et al. Factors to influence the accuracy of albumin adjusted free valproic acid concentration. J Formos Med Assoc 2021; 120: 1114-1120
  • 9 Yu YX, Lu J, Lu HD. et al. Predictive performance of reported vancomycin population pharmacokinetic model in patients with different renal function status, especially those with augmented renal clearance. Eur J Hosp Pharm 2022; 29: e6-e14
  • 10 Xue S, Lu H, Tang L, Fang J. et al. Predictive performance of population pharmacokinetic software on vancomycin steady-state trough concentration. Chinese Critical Care Medicine 2020; 32: 50-55 Chinese
  • 11 Soeorg H, Eva S, Andersen M. et al. Artificial neural network vs pharmacometric model for population prediction of plasma concentration in real-world data: A case study on valproic acid.. Clin Pharmacol Ther 2022; 111: 1278-1285
  • 12 Zhu X, Hu J, Xiao T. et al. An interpretable stacking ensemble learning framework based on multi-dimensional data for real-time prediction of drug concentration: The example of olanzapine. Front Pharmacol 2022; 13: 975855
  • 13 Wardi G, Owens R, Josef C. et al. Bringing the promise of artificial intelligence to critical care: What the experience with sepsis analytics can teach us. Crit Care Med 2023; 51: 985-991
  • 14 Dung-Hung C, Cong T, Zeyu J. et al. External validation of a machine learning model to predict hemodynamic instability in intensive care unit. Crit Care 2022; 26: 215
  • 15 Hao Y, Zhang J, Yang L. et al. A machine learning model for predicting blood concentration of quetiapine in patients with schizophrenia and depression based on real-world data. Br J Clin Pharmacol 2023; 89: 2714-2725
  • 16 Ma P, Shang S, Liu R. et al. Prediction of teicoplanin plasma concentration in critically ill patients: A combination of machine learning and population pharmacokinetics. J Antimicrob Chemother 2024; 79: 2815-2827
  • 17 Ma P, Liu R, Gu W. et al. Construction and interpretation of prediction model of teicoplanin trough concentration via machine learning. Front Med (Lausanne) 2022; 9: 808969
  • 18 Methaneethorn J. A systematic review of population pharmacokinetics of valproic acid. Br J Clin Pharmacol 2018; 84: 816-834
  • 19 Ibarra M, Vázquez M, Fagiolino P. et al. Sex related differences on valproic acid pharmacokinetics after oral single dose. J Pharmacokinet Pharmacodyn 2013; 40: 479-486
  • 20 Goecks J, Jalili V, Heiser LM. et al. How machine learning will transform biomedicine. Cell 2020; 181: 92-101
  • 21 Lan X, Mo K, Nong L. et al. Factors influencing sodium valproate serum concentrations in patients with epilepsy based on logistic regression analysis. Med Sci Monit 2021; 27: e934275
  • 22 Al-Quteimat O, Laila A. Valproate interaction with carbapenems: Review and recommendations. Hosp Pharm 2020; 55: 181-187
  • 23 Hiemke C, Bergemann N, Clement HW. et al. Consensus guidelines for therapeutic drug monitoring in neuropsychopharmacology: Update 2017. Pharmacopsychiatry 2018; 51: 9-62 Epub 2017 Sep 14. Erratum in: Pharmacopsychiatry 2018; 51: e1. DOI: 10.1055/s-0043-116492
  • 24 Li Z, Gao W, Liu G. et al. Interaction between valproic acid and carbapenems: Decreased plasma concentration of valproic acid and liver injury. Ann Palliat Med 2021; 10: 5417-5424
  • 25 Wu C, Pai T, Hsiao F. et al. The effect of different carbapenem antibiotics (ertapenem, imipenem/cilastatin, and meropenem) on serum valproic acid concentrations. Ther Drug Monit 2016; 38: 587-592
  • 26 Omoda K, Murakami T, Yumoto R. et al. Increased erythrocyte distribution of valproic acid in pharmacokinetic interaction with carbapenem antibiotics in rat and human. J Pharm Sci 2005; 94: 1685-1693
  • 27 Walker CP, Deb S. Rhabdomyolysis and hepatotoxicity from valproic acid: Case reports. J Pharm Pract 2021; 34: 648-652
  • 28 Al-Quteimat O, Laila A. Valproate interaction with carbapenems: Review and recommendations. Hosp Pharm 2020; 55: 181-187
  • 29 Suzuki E, Yamamura N, Ogura Y. et al. Identification of valproic acid glucuronide hydrolase as a key enzyme for the interaction of valproic acid with carbapenem antibiotics. Drug Metab Dispos 2010; 38: 1538-1544
  • 30 Santos-Gallego CG, Badimon J. Overview of aspirin and platelet biology. Am J Cardiol 2021; 144: S2-S9
  • 31 Tang D, Song BL, Yan M. et al. Identifying factors affecting the pharmacokinetics of voriconazole in patients with liver dysfunction: A population pharmacokinetic approach. Basic Clin Pharmacol Toxicol 2019; 125: 34-43
  • 32 Tang D, Yan M, Song BL. et al. Population pharmacokinetics, safety and dosing optimization of voriconazole in patients with liver dysfunction: A prospective observational study. Br J Clin Pharmacol 2021; 87: 1890-1902
  • 33 Dore M, San JA, Frenette AJ. et al. Clinical importance of monitoring unbound valproic acid concentration in patients with hypoalbuminemia. Pharmacotherapy 2017; 37: 900-907
  • 34 Biesterveld BE, Siddiqui AZ, O’Connell RL. et al. Valproic acid protects against acute kidney injury in hemorrhage and trauma. J Surg Res 2021; 266: 222-229
  • 35 Guo J, Huo Y, Li F. et al. Impact of gender, albumin, and CYP2C19 polymorphisms on valproic acid in Chinese patients: A population pharmacokinetic model [J]. J Int Med Res 2020; 48: 1220751833
  • 36 Peng Q, Ma M, Gu X. et al. Evaluation of factors impacting the efficacy of single or combination therapies of valproic acid, carbamazepine, and oxcarbazepine: A longitudinal observation Study. Front Pharmacol 2021; 12: 641512
  • 37 Kur DK, Agersnap N, Hollander NH. et al. Evaluation of the HemoCue WBC DIFF in leukopenic patient samples. Int J Lab Hematol 2020; 42: 256-262
  • 38 Sime FB, Roberts MS, Roberts JA. Optimization of dosing regimens and dosing in special populations. Clin Microbiol Infect 2015; 21: 886-893