Time-to-event prediction (survival analysis) with PyTorch.
The python package contains implementations of various survival models, some useful evaluation metrics, and a collection of event-time datasets.
The package contains implementations for
Cox-Time: a non-proportional relative risk model.  [example]
Cox-CC: a Cox-PH model.  [example]
DeepSurv: a Cox-PH model.  [example]
DeepHit (single event): a discrete time model.  [example]
Time-dependent concordance index. 
Brier score IPCW (inverse probability of censoring weighting).  
Binomial log-likelihood IPCW.
- For available data sets see datasets or the module
The package only works for python 3.6+.
Before installing pycox, please install PyTorch (version >= 1.1). You can then run the following command to install the package, but we recommend to instead install from source (see below)
pip install -e git+git://github.com/havakv/pycox.git#egg=pycox git+git://github.com/havakv/torchtuples.git
Install from source
pip install git+git://github.com/havakv/torchtuples.git
Next, clone and install with
git clone https://github.com/havakv/pycox.git cd pycox python setup.py install
 Håvard Kvamme, Ørnulf Borgan, and Ida Scheel. Time-to-event prediction with neural networks and Cox regression. Journal of Machine Learning Research, 20(129):1–30, 2019. [paper]
 Jared L. Katzman, Uri Shaham, Alexander Cloninger, Jonathan Bates, Tingting Jiang, and Yuval Kluger. Deepsurv: personalized treatment recommender system using a Cox proportional hazards deep neural network. BMC Medical Research Methodology, 18(1), 2018. [paper]
 Changhee Lee, William R Zame, Jinsung Yoon, and Mihaela van der Schaar. Deephit: A deep learning approach to survival analysis with competing risks. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. [paper]
 Laura Antolini, Patrizia Boracchi, and Elia Biganzoli. A time-dependent discrimination index for survival data. Statistics in Medicine, 24(24):3927–3944, 2005. [paper]
 Erika Graf, Claudia Schmoor, Willi Sauerbrei, and Martin Schumacher. Assessment and comparison of prognostic classification schemes for survival data. Statistics in Medicine, 18(17-18):2529–2545, 1999. [paper]
 Thomas A. Gerds and Martin Schumacher. Consistent estimation of the expected brier score in general survival models with right-censored event times. Biometrical Journal, 48 (6):1029–1040, 2006. [paper]