This repository provides a complete code replication for the paper Empirical Comparison of Continuous and Discrete-time Representations for Survival Prediction (Michael Sloma, Fayeq Syed, Mohammedreza Nemati and Kevin S. Xu) presented at AAAI Symposium 2021 Workshop on Survival Prediction: Algorithms, Challenges and Applications (SP-ACA).
- We utilized Anaconda for our environment/package management but you may also use the PIP virtual environment.
- PySurvival and Ray do not play nicely with Windows, so we recommend using Linux (We used Ubuntu 18.04).
- We utilized Python 3.8.5
Once you have set up your Python environment you can install the requirements needed by navigating to this
project's directory and running pip install -r requirements.txt
To download all the data automatically and run both the CoxPH and MTLR models, all you need to do is run the main.py
file.
If all you want to do is download the data used in this paper that is not scikit-survival data,
you can run the data_downloader.py
file.
If you want to run the CoxPH models and have optionally downloaded the data, you can run the aaai_coxph_func.py
.
If you have not downloaded the data, it will do it for you.
If you want to run the MTLR models and have optionally downloaded the data, you can run the aaai_mtlr_func.py
.
If you have not downloaded the data, it will do it for you.
The easiest way to access the results is to use MLFlow. After you have run
the experiments you can run mlflow ui
in this directory. We have noted that on the MTLR experiments with 5000 samples
that MLflow may run into a server error. We have included an optional secondary method for accessing the results in
mlrun_reader.py
which will "manually" read the results in the ./mlruns
directory for you.