The original implementation of the paper. You can cite the paper as below.
@inproceedings{ozyurt2021attdmm,
title={AttDMM: an attentive deep Markov model for risk scoring in intensive care units},
author={Ozyurt, Yilmazcan and Kraus, Mathias and Hatt, Tobias and Feuerriegel, Stefan},
booktitle={Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery \& Data Mining},
pages={3452--3462},
year={2021}
}
For a straight-forward use of AttDMM, you can install the required libraries from requirements_attdmm.txt:
pip install -r requirements_attdmm.txt
We made our experiments on MIMIC-III dataset, which is not publicly availiable. In order to access the dataset, please refer to https://mimic.physionet.org/gettingstarted/access/ .
After downloading MIMIC-III, you can use the following github repo for the pre-processing: https://github.com/USC-Melady/Benchmarking_DL_MIMICIII .
To be aligned with our AttDMM implementation, you need to have the following files under each fold directory.
- Time-series features (N,T,M):
- time_series_training.npy
- time_series_val.npy
- time_series_test.npy
- Static features (N,S):
- nontime_series_training.npy
- nontime_series_val.npy
- nontime_series_test.npy
- Time-series masks (N,T,M):
- time_series_training_masking.npy
- time_series_val_masking.npy
- time_series_test_masking.npy
- Mortality Labels (N):
- y_mor_training.npy
- y_mor_val.npy
- y_mor_test.npy
where N is number of time-series, T is number of time steps, M is number of time-series features, and S is number of static features.
For training:
python main.py --cuda --experiments_main_folder experiments --experiment_folder default --log attdmm.log --save_model model --save_opt opt --checkpoint_freq 10 --eval_freq 10 --data_folder /home/Data/fold0
All the log files and the model checkpoints will be saved under current_dir/experiments_main_folder/experiment_folder/
for testing:
python main.py --cuda --experiments_main_folder experiments --experiment_folder default --log attdmm_eval.log --load_model model_best --load_opt opt_best --eval_mode --data_folder /home/Data/fold0
Note that experiments_main_folder and experiment_folder have to be consistent with training so that the correct model is loaded properly. After testing is done, the prediction outputs can be found as current_dir/experiments_main_folder/experiment_folder/mortality_predictions_test.csv
For the full set of arguments, please check main.py .