Code Monkey home page Code Monkey logo

textgcn_analysis's Introduction

Understanding Graph Convolutional Networks for Text Classification

Official Implementation for AAAI 2022 on DLG (https://arxiv.org/abs/2203.16060)

Han, C.*, Yuan, Z.*, Wang, K., Long, S., & Poon, J. (2022).
Understanding Graph Convolutional Networks for Text Classification
In proceeding of AAAI 2022 on DLG

*co first author

Easy running using .ipynb file

You can simply run the code with your data using final.ipynb, remember to fill in your dataset into a list of documents/labels

original_train_sentences = 
original_labels_train = 
original_test_sentences = 
original_labels_test = 

# example 
# original_train_sentences = ['this is sample 1','this is sample 2']
# original_labels_train = ['postive','negative']
# original_test_sentences = ['this is sample 1','this is sample 2']
# original_labels_test = ['postive','negative']

Also, some other parameters can be modified

# EDGE: 0 means only d2w edge, 1 means d2w+w2w, 2 means d2w+w2w+d2d edge
EDGE = 0

# NODE: 0 means one-hot as input, 1 means BERT embedding as input
NODE = 0 

NUM_LAYERS = 2 
HIDDEN_DIM = 200
DROP_OUT = 0.5
LR = 0.02
WEIGHT_DECAY = 0
EARLY_STOPPING = 10
NUM_EPOCHS = 200

textgcn_analysis's People

Contributors

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