Skip to content

nsheils/graphqembed

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GraphQEmbed

Maintainer: William L. Hamilton (wleif@stanford.edu)

Code for making predictions about logical queries using network embeddings and for reproducing the results of the paper "Querying Complex Networks in Vector Space."

Setup and requirements

Run pip install -r requirements.txt to obtain the necessary requirements. The primary requirements is pytorch with version >=3.0. You may want to use a virtualenv or Docker.

The biological interaction network data used in the paper can be downloaded here. Unzip the data in your working directory.

Running the code

To train a model on the Bio data, run python -m netquery.bio.train. See that file for a list of possible arguments, and note that by default it assumes that the data is in a subdirectory of your working directory (i.e., "./bio_data). By default the model will log its output and store a version of the model after training. The train, test, and validation performance will be recorded in the log file. If you are training with a GPU be sure to add the cuda flag, i.e., python -m netquery.bio.train --cuda. The default parameters correspond to the best performing variant from the paper.

NB: Currently the training files are not-portable pickle files. We hope to release a more portable version of the data soon.

NB: Only the bio data is currently publicly available.

About

Learning to query complex networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%