This code repository provides the code to run the PKRNN-2CM, an autoregressive recurrent neural network (RNN) model containing a two-compartment (2CM) pharmacokinetic (PK) model as the prediction head for vancomycin dynamic prediction using time-series electronic health record (EHR) data.
The PKRNN-2CM model integrates an RNN for PK parameter estimation and a 2CM PK model for generating concentration trajectory. This model has been developed using time series EHR data from a cohort of 5,483 patients.
Please refer to our paper
A deep-learning-based two-compartment predictive model (PKRNN-2CM) for vancomycin therapeutic drug monitoring
Bingyu Mao, Ziqian Xie, Masayuki Nigo, Laila Rasmy, Degui Zhi
for more details.
We won't provide the original dataset we used to develop the PKRNN-2CM model, but an example of the input data can be found here: sample_data.pkl. You may also refer to the main branch for more details about the data format of the model input.
- Python 3.8;
- Required Python packages can be installed using
pip install -r requirements.txt.
Please follow the steps in the notebook main.ipynb to run the PKRNN-2CM model. This notebook also includes the steps for model evaluation.
This figure shows the results of time-concentration curves for one sample patient. The top panel showcases a patient for whom the PKRNN-2CM model, when utilizing real data, outperformed the PKRNN-1CM model (PKRNN-1CM RMSE: 27.18; PKRNN-2CM RMSE: 21.32). In the bottom panel, the inference PKRNN-2CM model captured most of the simulated observations, whereas the inference PKRNN-1CM model missed over half of them, with consistent RMSEs (PKRNN-1CM: 17.54; PKRNN-2CM: 15.20). Please refer to our paper for more details.
Please post a GitHub issue if you have any questions.
Please acknowledge the following work in papers or derivative software:
Bingyu Mao, Ziqian Xie, Masayuki Nigo, Laila Rasmy, and Degui Zhi. "A deep-learning-based two-compartment predictive model (PKRNN-2CM) for vancomycin therapeutic drug monitoring."
