Coder Social home page Coder Social logo

mnm's Introduction

MNM

Supported Python versions Supported Pytorch versions

Leveraging prior knowledge for protein–protein interaction extraction with memory network Zhou, H., Liu Z., Yang Y. et al. Published in Database: The Journal of Biological Databases and Curation

An implementation of Memory Networks Model (MNM) for protein-protein extraction task.

This code has been written using Pytorch 0.2.

Import data

We have put word embeddings, entity and relation embeddings learned from TransE[1] to the folder of data.

Basic example

Go to the model path and run:

❱❱❱ python3 main.py

In this setting, the default hyperparameters are used. Or run in specific settings:

❱❱❱ python3 main.py --trainPath ../data/train.txt --testPath ../data/test.txt --batchSize 100 --wd 100 --ed 100 --hop 2 --clas 2 --epoch 20 --wePath ../data/wordEmb/bio-word2id100 --w2IDPath ../data/wordEmb/bio-embed100 --eePath ../data/KB/entity2vec.vec --rePath ../data/KB/relation2vec.vec --t2idPath ../data/KB/triple2id.txt --e2idPath ../data/KB/entity2id.txt --paraPath ./parameters/ --results ./results/

the option you can choose are:

  • --trainPath path of train dataset.
  • --testPath path of test dataset.
  • --batchSize batch size.
  • --wd dimension of word embedding.
  • --ed dimension of entity embedding learned from TransE.
  • --hop number of hop.
  • --clas number of class.
  • --epoch number of iterations.
  • --wePath path of word embedding file.
  • --w2IDPath path of file that contains mapping from word to its number.
  • --eePath path of entity embedding file.
  • --rePath path of relation embedding file.
  • --t2idPath path of file that contains the triples.
  • --e2idPath path of file that contains mapping from Entrez Gene ID to number.
  • --paraPath path of model parameters.
  • --results path where the results write to.

Reference

[1] Bordes, Antoine, et al. Translating embeddings for modeling multi-relational data. Proceedings of NIPS, 2013.

mnm's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.