Skip to content

lehgtrung/egfr-att

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Attention-based Multi-input Neural network

PWC

How to install

Using conda:

conda env create -n egfr -f environment.yml
conda activate egfr

Usage

The working folder is egfr-att/egfr for the below instruction.

To train with Train/Test scheme, use:

python single_run.py --mode train

The original data will be splitted into training/test parts with ratio 8:2. When training completed, to evaluate on test data, use:

python single_run.py --mode test --model_path <MODEL-IN-TRAINED_MODELS-FOLDER>
# For example:
python single_run.py --mode test --model_path data/trained_models/model_TEST_BEST

ROC curve plot for test data will be placed in egfr/vis folder.

To train with 5-fold cross validation scheme, use:

python cross_val.py --mode train

When training completed, to evaluate on test data, use:

python cross_val.py --mode test --model_path <MODEL-IN-TRAINED_MODELS-FOLDER>
# For example:
python cross_val.py --mode test --model_path data/trained_models/model_TEST_BEST

ROC curve plot for test data will be placed in egfr/vis/ folder.

Attention weight visualization

To visualized attention weight of the model, use:

python weight_vis.py --dataset <PATH-TO-DATASET> --modelpath <PATH-TO-MODEL>
# For example:
python weight_vis.py --dataset data/egfr_10_full_ft_pd_lines.json --modelpath data/trained_models/model_TEST_BEST

By default, all data will be used to to extract attention weights. However, only samples with prediction output over a threshold (0.2) are chosen.

Citation

Please cite our study:

Pham, H.N., & Le, T.H. (2019). Attention-based Multi-Input Deep Learning Architecture for Biological Activity Prediction: An Application in EGFR Inhibitors. ArXiv, abs/1906.05168.

Bibtex:

@article{Pham2019AttentionbasedMD,
  title={Attention-based Multi-Input Deep Learning Architecture for Biological Activity Prediction: An Application in EGFR Inhibitors},
  author={Huy Ngoc Pham and Trung Hoang Le},
  journal={2019 11th International Conference on Knowledge and Systems Engineering (KSE)},
  year={2019},
  pages={1-9}
}

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •