This repository contains code for paper InducT-GCN: Inductive Graph Convolutional Networks for Text Classification
Wang, K., Han, S. C., & Poon, J. (2020)
InducT-GCN: Inductive Graph Convolutional Networks for Text Classification]
In ICPR 2022
Simply run python main.py --dataset 'R8' --train_size 0.05
Argument | Default | Description |
---|---|---|
dataset | R8 | Dataset string: R8, R52, OH, 20NGnew, MR |
train_size | 1 | If it is larger than 1, it means the number of training samples. If it is from 0 to 1, it means the proportion of the original training set. |
test_size | 1 | If it is larger than 1, it means the number of training samples. If it is from 0 to 1, it means the proportion of the original test set. |
remove_limit | 2 | Remove the words showing fewer than 2 times |
use_gpu | 1 | Whether to use GPU, 1 means True and 0 means False. If True and no GPU available, will use CPU instead. |
shuffle_seed | None | If not specified, train/val is shuffled differently in each experiment. |
hidden_dim | 200 | The hidden dimension of GCN model |
dropout | 0.5 | The dropout rate of GCN model |
learning_rate | 0.02 | Learning rate, and the optimizer is Adam |
weight_decay | 0 | Weight decay, normally it is 0 |
early_stopping | 10 | Number of epochs of early stopping |
epochs | 200 | Number of maximum epochs |
multiple_times | 10 | Running multiple experiments, each time the train/val split is different |
easy_copy | 1 | For easy copy of the experiment results. 1 means True and 0 means False. |
If you find this paper useful, please cite it by
@inproceedings{wang2022induct,
title={Induct-gcn: Inductive graph convolutional networks for text classification},
author={Wang, Kunze and Han, Soyeon Caren and Poon, Josiah},
booktitle={2022 26th International Conference on Pattern Recognition (ICPR)},
pages={1243--1249},
year={2022},
organization={IEEE}
}
Part of the code is inspired by https://github.com/tkipf/pygcn and https://github.com/yao8839836/text_gcn, but has been modified.