GithubHelp home page GithubHelp logo

h2h-gcn's Introduction

A Hyperbolic-to-Hyperbolic Graph Convolutional Network (H2H-GCN)

This repository includes the implementations of H2H-GCN for the link prediction and node classification tasks on the Disease dateset [1] in PyTorch.

Before running the model, please create environment according to "requirments.txt".

For link prediction, run

''' python train.py --task lp --dataset disease_lp --model H2HGCN --normalize-feats 0 --log-freq 20 --epochs 5000 --step_lr_reduce_freq 5000 --feature_dim 11 --tie_weight True --patience 1000 --lr 0.001 --lr_stie 0.001 --dim 256 --num-layers 2 '''

For node classification, run

''' python train.py --task nc --dataset disease_nc --model H2HGCN --log-freq 20 --lr_scheduler step --epochs 5000 --step_lr_reduce_freq 5000 --feature_dim 1000 --tie_weight True --lr 0.01 --lr_stie 0.01 --num_centroid 200 --dim 64 --num-layers 5 '''

optional arguments:

--task                  which tasks to train on, 'lp' or 'nc'  
--dataset               which dataset to use, 'disease_lp' or 'disease_nc'  
--model                 which model to use   
--lr                    learning rate for Euclidean parameters  
--lr_stie               learning rate for the Stiefel parameters  
--normalize-feats       whether to normalize input node features  
--epochs                maximum number of epochs  
--step_lr_reduce_freq   step_size for StepLR scheduler   
--feature_dim           feature_dim input feature dimensionality  
--dim                   embedding dimensionality  
--num-layers            number of hidden layers  
--patience              patience for early stopping  
--num_centroid          number of centroids used for the node classification task  

Directory:

   data                     datasets files, including the "disease_lp" and "disease_nc"  
   layers                   include a centroid-based classification and layers used in H2H-GCN  
   log                      path to save logs  
   manifolds                include the Lorentz manifold and the Stiefel manifold  
   model_save               path to save trained models  
   models                   encoder for graph embedding and decoder for post-processing  
   optimizers               optimizers for orthogonal parameters  
   utils                    utility modules and functions  
   config.py                config file  
   train.py                 run this file to start the training  
   requirements.txt         requirements file  
   README.md                README file  

References

[1] Chami, I., Ying, R., Ré, C. and Leskovec, J. Hyperbolic Graph Convolutional Neural Networks. NIPS 2019.

h2h-gcn's People

Contributors

jindoudai 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.