A computational framework for drug repurposing from real-world data. DeepIPW: Deep Inverse Propensity Weighting.
OS: Ubuntu 16.04
GPU: NVIDIA 1080ti (11GB memory) is minimum requirement. We recommend NVIDIA TITAN RTX 6000 GPUs.
Python 3.6
Pytorch 1.2.0
Scipy 1.3.1
Numpy 1.17.2
Scikit-learn 0.22.2
cd preprocess
python run_preprocess.py
- --min_patients, minimum number of patients for each cohort.
- --min_prescription, minimum times of prescriptions of each drug.
- --time_interval, minimum time interval for every two prescriptions.
- --followup, number of days of followup period.
- --baseline, number of days of baseline period.
- --input_pickles, data pickles.
- --save_cohort_all, save path.
bash run_lstm.sh
cd deep-ipw
python main.py
- --data_dir, input cohort data
- --pickles_dir, pickles file.
- --treated_drug_file, current evaluating drug.
- --controlled_drug, sampled controlled drugs (randomly sampling or ATC class).
- --controlled_drug_ratio, ratio of the number of controlled drug.
- --input_pickles, data pickles.
- --random_seed.
- --batch_size.
- --diag_emb_size.
- --med_emb_size.
- --med_hidden_size.
- --diag_hidden_size.
- --learning_rate.
- --weight_decay.
- --epochs
- --save_model_filename.
- --outputs_lstm.
- --outputs_lr.
- --save_db.