Giter Club home page Giter Club logo

gcn_elliptic-dataset's Introduction

GCN_Elliptic-Dataset

Graph Convolutional Network on data from Elliptic bitcoin dataset of transactions graph

Instructions

Requirements

  • Python
  • PyTorch
  • pandas
  • scikit-learn

Dataset

  • Download the Elliptic Dataset for Bitcoin transactions
  • Don't change the names of the csv files
  • If you change the name of the folder pass the path with the changed name as the command line argument for the dataset directory while training and testing

Code Files

The files present in Code are:

  • util.py: Contains the function for loading the data
  • model.py: Implementation of the Graph Convolutional Network with 2 layers
  • train_GCN.py: Python script to train the GCN
  • test_GCN.py: Python script to test the GCN using weights from training
  • train_SkipGCN.py: Python script to train the SkipGCN
  • test_SkipGCN.py: Python script to test the SkipGCN using weights from training
  • GCN_Elliptic Dataset.ipynb: The main ipynb notebook used for all the tasks

The weights for the models are provided in a folder titled gcn_weights. They can be obtained here

Usage

Training the GCN

python train_GCN.py -d [:dataset directory path] -e [:number of epochs] -l [:learning rate] -t [:number of timesteps to train] -m [:directory to save model weights]

Testing the GCN

python test_GCN.py -d [:dataset directory path] -t [:timestep to start testing] -m [:model weights directory]

Training the SkipGCN

python train_SkipGCN.py -d [:dataset directory path] -e [:number of epochs] -l [:learning rate] -hs [:hidden layer size] -t [:number of timesteps to train] -m [:directory to save model weights]

Training the SkipGCN might be unstable and lead to NANs in the output. The problem might be solved by changing the size of the hidden layer. Use the -hs argument to change the hidden layer size. Use the same hidden layer size for training and testing. The model weights provided are for a hidden layer of size 16.

Testing the SkipGCN

python test_SkipGCN.py -d [:dataset directory path] -t [:timestep to start testing] -hs [:hidden layer size] -m [:model weights directory]

gcn_elliptic-dataset's People

Contributors

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