Giter Club home page Giter Club logo

swge's Introduction

SWGE

Our implementation of Signed Whole Graph Embeddings methods.

Description

This set of scripts implements the signed whole graph embedding methods presented in our paper. It can be used to:

  • Learn the representations of whole signed graphs.
  • Perform classification tasks based on the embeddings extracted from signed methods.

Data

We include a few graphs for each dataset in the data folder. The full datasets can be downloaded from [anonymity - available later] Place the downloaded graphs directly into the corresponding folder in data.

Organization

This repository is composed of the following elements:

  • Folder data: input signed networks.

  • Folder out: contains the files produced by our scripts.

  • requirements.py: List of Python packages used in SWGE.

  • There are 3 main scripts:

    • SG2V.py: Performs the representation learning step related to the Signed Graph2Vec methods.
    • run_sgcn.py: Performs the representation learning step related to the Signed Graph Convolutional Networks methods.
    • evaluation.py: Performs the classification task.

Installation

  • Install Python (tested with Python 3.6.9)
  • Install dependencies using the following command:
    pip install -r requirements.txt
    
  • The SGCN method is based on the code of SGCN.
  • Retrieve the data from Zenodo and place them into the data folder.

How to use ?

  • In order to learn representations with Signed Graph2Vec, run the file SG2V.py. You can configure the model_type between the 3 versions proposed in our paper: g2v, sg2vn or sg2vsb.
  • In order to learn representations with SGCN, run the file run_sgcn.py.

These scripts will export the learned representations into the out folder.

  • After running the previous scripts, you can perform the classification by running evaluation.py. You can configure the path_emb and path_label variables to change the dataset used.

  • The main.py file can be used to run all the experiment with a single script.

References

swge's People

Contributors

noececillon avatar vlabatut avatar

Watchers

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