Code Monkey home page Code Monkey logo

curriculum-learning-for-sparse-drug-targetinteraction-mining's Introduction

Curriculum Learning for Sparse Drug-TargetInteraction Mining

by Xinyu Xu, Xichen Pan, Haotian Xue, Peiyu Chen

Environment

python3.6+
torch
numpy
tensorboardX
# used in test
pysmiles==1.0.1
h5py

Quick Start

Install requirements first by runing:

pip install -r requirements.txt

Test the model as follows:

cd \path\to\test.py
python .\test.py --csv_file path\to\csvfile --gpu_id 0

Train the model following steps:

  1. change pretrain_dir to your own one then put pretrained protein embedding model in it.
  2. put your csvfile into data fold then run
python .\preprocessing\decompose.py
python .\preprocessing\make_graph_dict.py
python .\preprocessing\saveh5.py
  1. train the model by runing:
python train.py --save_dir neg3 --gpu_id 0 --neg_rate 3
  1. Doing curriculum learning by running:
python train.py --save_dir neg15 --gpu_id 0 --neg_rate 15 --curriculum_weight ./checkpoints/neg3/model.pt

File structure after test

│  find_threshold.py
│  logits_ex.py
│  README.md
│  requirements.txt
│  result.csv # result file
│  test.py
│  train.py
│  
├─cache
│      model_weight.bin
│      targetfeature.h5
│      
├─ckp
│      submit.h5
│      submit.pt
│      
├─data
│      Dataset.py
│      datautils.py
│      drug.pkl
│      element.json
│      hcount.json
│      pairs.pkl
│      target.pkl
│      test_neg_pairs.pkl
│      test_pos_pairs.pkl
│      
├─models
│      Aggregation.py
│      attn.py
│      convlist.py
│      dt_net.py
│      GraphModels.py
│      labelsmoothing.py
│      
├─preprocessing
│      decompose.py
│      make_graph_dict.py
│      saveh5.py
│      
├─src
│  │  alignment.pyx
│  │  alphabets.py
│  │  fasta.py
│  │  metrics.pyx
│  │  parse_utils.py
│  │  pdb.py
│  │  pfam.py
│  │  scop.py
│  │  transmembrane.py
│  │  utils.py
│  │  __init__.py
│  │  
│  └─models
│          comparison.py
│          embedding.py
│          multitask.py
│          sequence.py
│          __init__.py
│          
└─utils
        general.py
        parser.py
        protein_embedding.py

curriculum-learning-for-sparse-drug-targetinteraction-mining's People

Contributors

allenxuuu avatar xavihart avatar xichenpan avatar

Stargazers

ONCE avatar Peiyu Chen avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.