Giter VIP home page Giter VIP logo

product_hgcn's Introduction

CS229 project - product space GCN

Adapted from https://github.com/HazyResearch/hgcn

The dependencies are the following:

virtualenv -p [PATH to python3.7 binary] hgcn
source hgcn/bin/activate
pip install -r requirements.txt

To run additional tests, please use train.py This script trains models for link prediction and node classification tasks. Metrics are printed at the end of training or can be saved in a directory by adding the command line argument --save=1.

For our purposes, the following command may be more useful than others:

python3 train.py --task lp --dataset <dataset_name> --model HGCN --lr 0.01 --dim <num_dim> --num-layers 2 --act relu --bias 0 --dropout 0.5 --weight-decay 0.001 --manifold <choice_of_prod_space> --log-freq 5 --cuda 0 --c 1

For now, the choice of product space should be the ratio between three spaces <E,S,P> corresponding to Euclidean, Spherical and Hyperboloid(PoincareBall) and the sum should be a divisor of your dimension input. An example input would be P1S1E2, where 4 divids 16. The dataset name for now can be chosen from cora for nc and lp, pubmed for nc (or lp or if one have memory > 32G due to the large number of nodes in the dataset; otherwise the initialization step ), disease_lp for lp, disease_nc for nc, airport for lp and nc.

The result can be replicate through the running the run_test.py script.

product_hgcn's People

Contributors

fal025 avatar

Stargazers

 avatar George avatar Amber Lee avatar Heyu avatar bug at 2am avatar

Watchers

 avatar  avatar

product_hgcn's Issues

Product Manifold should have different curvatures for different component manifolds.

In the productManifold class, it seems that the same curvature value is being passed for all manifolds. Consider the below piece of code from the expmap(self, u, p, c) function. The same curvature c is being passed for expmap to all sub-manifolds. This seems wrong. Shouldn't we pass the corresponding curvatures for every manifold?

        for i, manifold in enumerate(self.manifolds):
            point = self.take_submanifold_value(p, i)
            tangent = self.take_submanifold_value(u, i)
            mapped = manifold.expmap(tangent, point,c)

All the sub-manifolds cannot technically have the same curvatures since some might be positive (spherical) and some negative (hyperbolic).

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.