Giter VIP home page Giter VIP logo

dgcn's Introduction

DGCN

Introduction

This is a Theano implementation of DGCN, a Dual Graph Convolutional Networks method for graph-based semi-supervised classification proposed in the following paper:

Dual Graph Convolutional Networks for Graph-Based Semi-Supervised Classification. Chenyi Zhuang, Qiang Ma. WWW 2018.

Please cite our paper if you use this code in your own work.

Requirements

  • python 2.7
  • theano
  • networkx
  • scipy
  • Lasagne

Run the demo

python Test.py [dataset]

[dataset] could be strings: "citeseer", "cora", and "pubmed".

Models

The DGCN model is mainly implemented in Model.py. In layers.py, the dense layer, diffusion layer and dropout function are defined. In LossCalculation.py, the loss calculation functions and evaluation metric function (i.e., accuracy) are defined. In utilities.py, the random walk functions and temporal weight function are defined.

Prepare the raw data

In order to run the code on your own dataset, you need to prepare:

  • an n by n adjacency matrix (n is the number of nodes),
  • an n by k feature matrix (k is the number of features per node), and
  • an n by c binary label matrix (c is the number of classes).

Please refer to our paper and the files DataPreparation.py and utilities.py for detailed data pre-processing information.

For testing, the "citeseer", "cora", and "pubmed" datasets are available in the directory data. Due to the file size limitation, for the "nell_full" dataset, you could find at http://www.cs.cmu.edu/~zhiliny/data/nell_data.tar.gz or our pre-processed version.

Since we used the exactly same datasets for testing, for detailed information about these four datasets, you may refer to the Planetoid repository

Related work

Our work is inspired by the following papers:

The testing datasets were provided by:

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.