This is an implementation of an interpretable and continuous Long-Short term Memory (LSTM) network for the task of Acute Kidney Injury (AKI) prediction in ICU settings.
The LSTM model can be run via the LSTM.ipynb; the other baseline models can be run using the LR_XGB_RF.ipynb notebook.
To run the models some preliminary steps are needed to set-up the dataset and extract the data (see Section Data below).
- torch
- numpy
- sklearn
- pandas
- captum
- matplotlib
- seaborn
The MIMIC III dataset was used. The expected data files are:
kdigo_stages_measured.csvcontaining time-series measurements of creatinine, urine output for the last six, 12 and 24 hours and the respective labels.icustay_detail-kdigo_stages_measured.csvcontaining non-temporal variables of patient demographics such as: age (numerical), gender (binary), ethnicity group (categorical) and type of admission (categorical).labs-kdigo_stages_measured.csvcontaining time-series data of the laboratory tests.vitals-kdigo_stages_measured.csvcontaining time-series data of the measurements of vital signs.vents-vasopressor-sedatives-kdigo_stages_measured.csvcontaining temporal information on whether mechanical ventilation, vasopressor or sedative medications were applied.
To generate such data files some preliminary step are needed:
- Set-up MIMIC III
- Run the following SQL scripts from the MIMIC code repository:
mimic-iii/concepts/echo-data.sqlmimic-iii/concepts/demographics/icustay_detail.sqlmimic-iii/concepts/durations/weight-durations.sqlmimic-iii/concepts/durations/vasopressor-durations.sqlmimic-iii/concepts/durations/ventilation-durations.sqlmimic-iii/concepts/fluid-balance/urine-output.sqlmimic-iii/concepts/organfailure/kdigo-creatinine.sqlmimic-iii/concepts/organfailure/kdigo-stages-48hr.sqlmimic-iii/concepts/organfailure/kdigo-stages-7day.sqlmimic-iii/concepts/organfailure/kdigo-stages.sqlmimic-iii/concepts/organfailure/kdigo-uo.sql
- Run the SQL scripts in the
sqlfolder. Theextract_data.sqlshould be run after all the other scripts. These scripts builds on and extends the scripts from the MIMIC code repository mentioned at point 2.
Continuous AKI prediction
- LSTM
Prediction 48 hours before the onset of AKI
- Logistic regression
- XGBoost
- Random forest
If you use our code in your own work please cite our paper: Interpretable and Continuous Prediction of Acute Kidney Injury in the Intensive Care.
Bibtex:
@inproceedings{Vagliano:2021,
author = {Vagliano, Iacopo and Lvova, Oleksandra and Schut, Martijn C},
title = {Interpretable and Continuous Prediction of Acute Kidney Injury in the Intensive Care},
booktitle = {Public Health and Informatics},
series = {Studies in health technology and informatics},
pages = {103—107},
DOI = {10.3233/shti210129},
volume = {281},
month = {May},
year = {2021},
URL = {https://doi.org/10.3233/SHTI210129},
ISSN = {0926-9630},
}