All Projects → jaredleekatzman → Deepsurv

jaredleekatzman / Deepsurv

Licence: mit
DeepSurv is a deep learning approach to survival analysis.

Projects that are alternatives of or similar to Deepsurv

Chinese sentiment
用tensorflow进行中文自然语言处理的情感分析
Stars: ✭ 304 (+0.33%)
Mutual labels:  jupyter-notebook
Opensleep
platform for sleep hacking and research
Stars: ✭ 304 (+0.33%)
Mutual labels:  jupyter-notebook
Tensorflow 2.x Yolov3
YOLOv3 implementation in TensorFlow 2.3.1
Stars: ✭ 300 (-0.99%)
Mutual labels:  jupyter-notebook
Adaptiveattention
Implementation of "Knowing When to Look: Adaptive Attention via A Visual Sentinel for Image Captioning"
Stars: ✭ 303 (+0%)
Mutual labels:  jupyter-notebook
120 Ds Interview Questions
My Answer to 120 Data Science Interview Questions
Stars: ✭ 304 (+0.33%)
Mutual labels:  jupyter-notebook
Zat
Zeek Analysis Tools (ZAT): Processing and analysis of Zeek network data with Pandas, scikit-learn, Kafka and Spark
Stars: ✭ 303 (+0%)
Mutual labels:  jupyter-notebook
Python Seminar
Python for Data Science (Seminar Course at UC Berkeley; AY 250)
Stars: ✭ 302 (-0.33%)
Mutual labels:  jupyter-notebook
Gdrl
Grokking Deep Reinforcement Learning
Stars: ✭ 304 (+0.33%)
Mutual labels:  jupyter-notebook
Baby Steps Of Rl Ja
Pythonで学ぶ強化学習 -入門から実践まで- サンプルコード
Stars: ✭ 302 (-0.33%)
Mutual labels:  jupyter-notebook
Bayesmadesimple
Code for a tutorial on Bayesian Statistics by Allen Downey.
Stars: ✭ 303 (+0%)
Mutual labels:  jupyter-notebook
Minibook 2nd Code
Code of the IPython Minibook, 2nd edition (2015)
Stars: ✭ 303 (+0%)
Mutual labels:  jupyter-notebook
Musicautobot
Using deep learning to generate music in MIDI format.
Stars: ✭ 304 (+0.33%)
Mutual labels:  jupyter-notebook
Cartola
Extração de dados da API do CartolaFC, análise exploratória dos dados e modelos preditivos em R e Python - 2014-20. [EN] Data munging, analysis and modeling of CartolaFC - the most popular fantasy football game in Brazil and maybe in the world. Data cover years 2014-19.
Stars: ✭ 304 (+0.33%)
Mutual labels:  jupyter-notebook
Attention is all you need
Transformer of "Attention Is All You Need" (Vaswani et al. 2017) by Chainer.
Stars: ✭ 303 (+0%)
Mutual labels:  jupyter-notebook
Qiskit Community Tutorials
A collection of Jupyter notebooks developed by the community showing how to use Qiskit
Stars: ✭ 298 (-1.65%)
Mutual labels:  jupyter-notebook
Handwritten Text Recognition For Apache Mxnet
This repository lets you train neural networks models for performing end-to-end full-page handwriting recognition using the Apache MXNet deep learning frameworks on the IAM Dataset.
Stars: ✭ 300 (-0.99%)
Mutual labels:  jupyter-notebook
Pytorch exercises
Stars: ✭ 304 (+0.33%)
Mutual labels:  jupyter-notebook
Machine learning
周志华《机器学习》阅读笔记
Stars: ✭ 304 (+0.33%)
Mutual labels:  jupyter-notebook
Web Data Scraping S2019
Stars: ✭ 305 (+0.66%)
Mutual labels:  jupyter-notebook
Randomfun
Notebooks and various random fun
Stars: ✭ 304 (+0.33%)
Mutual labels:  jupyter-notebook

DeepSurv

DeepSurv implements a deep learning generalization of the Cox proportional hazards model using Theano and Lasagne.

DeepSurv has an advantage over traditional Cox regression because it does not require an a priori selection of covariates, but learns them adaptively.

DeepSurv can be used in numerous survival analysis applications. One medical application is provided: recommend_treatment, which provides treatment recommendations for a set of patient observations.

For more details, see full paper DeepSurv: Personalized Treatment Recommender System Using A Cox Proportional Hazards Deep Neural Network.

For an updated implementation of the Cox loss function in PyTorch, please see Feature Selection using Stochastic Gates (STG) by Yamada et al..

Installation:

From source

Download a local copy of DeepSurv and install from the directory:

git clone https://github.com/jaredleekatzman/DeepSurv.git
cd DeepSurv
pip install .

Dependencies

Theano, Lasagne (bleeding edge version), lifelines, matplotlib (for visualization), tensorboard_logger, and all of their respective dependencies.

Running the tests

After installing, you can optionally run the test suite with

py.test

from the command line while in the repo's main directory.

Running Experiments

Experiments are run using Docker containers built off of the floydhub deep learning Docker images. DeepSurv can be run on either the CPU or the GPU with nvidia-docker.

All experiments are in the DeepSurv/experiments/ directory.

To run an experiment, define the experiment name as an environmental variable EXPRIMENTand run the docker-compose file. Further details are in the DeepSurv/experiments/ directory.

Training a Network

Training DeepSurv can be done in a few lines. First, all you need to do is prepare the datasets to have the following keys:

{ 
	'x': (n,d) observations (dtype = float32), 
 	't': (n) event times (dtype = float32),
 	'e': (n) event indicators (dtype = int32)
}

Then prepare a dictionary of hyper-parameters. And it takes only two lines to train a network:

network = deepsurv.DeepSurv(**hyperparams)
log = network.train(train_data, valid_data, n_epochs=500)

You can then evaluate its success on testing data:

network.get_concordance_index(**test_data)
>> 0.62269622730138632

If you have matplotlib installed, you can visualize the training and validation curves after training the network:

deepsurv.plot_log(log)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].