Skip to content

MLD3/MLHC2019_Relaxed_Parameter_Sharing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code repository for MLHC 2019 paper Relaxed Weight Sharing: Effectively Modeling Time-Varying Relationships in Clinical Time-Series

Directory structures

lib/ contains implementation for mixLSTM

ARFshock/ contains code for ARF and shock dataset

mortality/ contains code for in hospitial mortality dataset

synthetic/ contains code for synthetic dataset

Download and Process the Data

Follow directions to complete the set up for the MIMIC III Benchmark dataset for in-hospital mortality: https://github.com/YerevaNN/mimic3-benchmarks.

Follow directions in ARFshock_label to produce ARF and shock labels.

Run savedata.py using python2. Example code below where MIMIC III benchmark data is saved in data/mimic and data files for model training will be saved in data/mlhc2019_RWS

python savedata.py --datadir /data/mimic/ --savedir /data/mlhc2019_RWS/ 

Running the code

synthetic dataset

The following exmple code will train mutliple models using the default settings described in LSTM11q_main.py for generating synthetic datasets. Each run requires that a runname and model be specified. Runname determines the name used when saving output. Model is a list that determines which models will be trained. Additional settings such as which GPU device to use can be changed using options such as cuda in the example code below. Data and save directories should also be modified either via options or set as defaults in LSTM11q_main.py. See LSTM11q_main.py for more details.

python LSTM11q_main.py --runname your_model_will_be_saved_as --synthstart True --model "nidLSTM 2" LSTM mow HyperLSTM --cuda 0

ARF and Shock

The following exmple code will train a model using the default settings described in LSTM11s_main.py. Each run requires that a runname, mode and model be specified. Runname determines the name used when saving output. Mode can be either “ARF” or “Shock” and determines the data/task. Model determines what kind of model will be trained. In the example a shiftLSTM-2 will be learned. Additional settings such as which GPU device to use can be changed using options such as cuda in the example code below. Data and save directories should also be modified either via options or set as defaults in LSTM11s_main.py. See LSTM11s_main.py for more details.

python LSTM11s_main.py --runname your_model_will_be_saved_as --mode ARF --model "shiftLSTM 2" --realstart True --cuda 1

mortality

The following exmple code will train a model using the default settings described in LSTM11r_main.py. Each run requires that a runname and model be specified. Runname determines the name used when saving output. Model determines what kind of model wil be trained. In the example a shiftLSTM-2 will be learned. Additional settings such as which GPU device to use can be changed using options such as cuda in the example code below. Data and save directories should also be modified either via options or set as defaults in LSTM11r_main.py. See LSTM11r_main.py for more details.

python LSTM11r_main.py --runname your_model_will_be_saved_as --model "shiftLSTM 2" --realstart True --cuda 1

About

Code release for "Relaxed Weight Sharing: Effectively Modeling Time-Varying Relationships in Clinical Time-Series" (Oh, Wang, Tang, Sjoding, Wiens), MLHC 2019. https://arxiv.org/abs/1906.02898

Topics

Resources

License

Stars

Watchers

Forks

Languages