Files
Ashutosh-Adhikari 650882fb6e Add HAN and XML_CNN for Doc Classification (#154)
* Add Reuters option in common.dataset

* Add Reuters option in common.dataset

* Add HAN model

* Add XML-CNN

* Add HAN

* Add Hierarchical tokenization for Reuters

* Add README for HAN

* Add XML Readme

* Update HAN Readme
2018-10-25 15:45:13 -04:00

41 lines
1.1 KiB
Markdown

# XML_CNN
Implementation for XML Convolutional Neural Network for Document Classification of [XML-CNN (2014)](http://nyc.lti.cs.cmu.edu/yiming/Publications/jliu-sigir17.pdf) with PyTorch and Torchtext.
## Model Type
- rand: All words are randomly initialized and then modified during training.
- static: A model with pre-trained vectors from [word2vec](https://code.google.com/archive/p/word2vec/). All words -- including the unknown ones that are initialized with zero -- are kept static and only the other parameters of the model are learned.
- non-static: Same as above but the pretrained vectors are fine-tuned for each task.
## Quick Start
To run the model on Reuters dataset on static just run the following from the Castor working directory.
```
python -m xml_cnn --dataset Reuters
```
The file will be saved in
```
xml_cnn/saves/best_model.pt
```
## Dataset
We experiment the model on the following datasets.
- Reuters: A multi-label document classification dataset.
## Settings
Adam is used for training.
## TODO
- Report hyperparameters and results after finetuning on other datasets like AAPD.