Coder Social home page Coder Social logo

leviome / gnn-comparison Goto Github PK

View Code? Open in Web Editor NEW

This project forked from diningphil/gnn-comparison

1.0 1.0 0.0 817 KB

Official Repository of "A Fair Comparison of Graph Neural Networks for Graph Classification", ICLR 2020

License: GNU General Public License v3.0

Jupyter Notebook 4.10% Python 95.90%

gnn-comparison's Introduction

A Fair Comparison of Graph Neural Networks for Graph Classification

Summary

The library includes data and scripts to reproduce the experiments reported in the paper.

This research software is provided as is. If you happen to use or modify this code, please remember to cite the paper:

Federico Errica, Marco Podda, Davide Bacciu and Alessio Micheli: A Fair Comparison of Graph Neural Networks for Graph Classification. Proceedings of the 8th International Conference on Learning Representations (ICLR 2020).

If you are interested in an introduction to Deep Graph Networks, check this out:

Davide Bacciu, Federico Errica, Alessio Micheli and Marco Podda: A Gentle Introduction to Deep Learning for Graphs

Instructions

To reproduce the experiments, first preprocess datasets as follows:

python PrepareDatasets.py DATA/CHEMICAL --dataset-name <name> --outer-k 10

python PrepareDatasets.py DATA/SOCIAL_1 --dataset-name <name> --use-one --outer-k 10

python PrepareDatasets.py DATA/SOCIAL_DEGREE --dataset-name <name> --use-degree --outer-k 10

Where <name> is the name of the dataset. Then, substitute the split (json) files with the ones provided in the data_splits folder.

Please note that dataset folders should be organized as follows:

CHEMICAL:
    NCI1
    DD
    ENZYMES
    PROTEINS
SOCIAL[_1 | _DEGREE]:
    IMDB-BINARY
    IMDB-MULTI
    REDDIT-BINARY
    REDDIT-MULTI-5K
    COLLAB

Then, you can launch experiments by typing:

cp -r DATA/[CHEMICAL|SOCIAL_1|SOCIAL_DEGREE]/<name> DATA python Launch_Experiments.py --config-file <config> --dataset-name <name> --result-folder <your-result-folder> --debug

Where <config> is your config file (e.g. config_BaselineChemical.yml), and <name> is the dataset name chosen as before.

Troubleshooting

The installation of Pytorch Geometric depends on other libraries (torch_scatter, torch_cluster, torch_sparse) that have to be installed separately and before torch_geometric. Do not use pip install -r requirements.txt because it will not work. Please refer to the official instructions to install the required libraries.

gnn-comparison's People

Contributors

diningphil avatar marcopodda avatar

Stargazers

 avatar

Watchers

 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.