kaize0409 / hypergat_textclassification Goto Github PK
View Code? Open in Web Editor NEWImplementation of EMNLP2020 -- Be More with Less: Hypergraph Attention Networks for Inductive Text Classification
Implementation of EMNLP2020 -- Be More with Less: Hypergraph Attention Networks for Inductive Text Classification
Thanks your fantastic work !
Hello !
I can use the generate_LDA.py now!
But I still have something confused!
parser.add_argument('--topn', type=int, default=10, help='top n keywords') parser.add_argument('--topics', type=int, help='number of topics')
I know --topn
is like your paper mention that top K words right?
But How to determine the number of --topics
?
The number of labels? Can if I use --topics 20
on R8 dataset, it will be error like scipy.sparse.coo_matrix
.
So like R8 has --topics :8
R52 has --topics :52
I'm nor really sure:(
Also I am trying to modify the framework of HyperGAT to fit on my Chinese multi label text classification data.
Which have approximately 2500 text with 9 labels.
Have you ever try your HyperGAT on multi label classification task?
such like Kaggle's toxic comment classification datasets ?
Thank you for this code.
Could you please provide the remaining datasets(20ng, ohsumed, and MR). or the link to datasets with preprocessing script.
Thanks
Hi, thanks your work!
I have some confusion about the code.
I want to know what self.word_context
means, and why concat with x1(pair_h = torch.cat((q1, x1), dim=-1)
๏ผ
q1 = self.word_context.weight[0:].view(1, -1).repeat(x1.shape[0],1).view(x1.shape[0], self.out_features)
)?
It doesn't seem to be reflected in the formula.
When AGGR(edge) aggregates features of hyperedges to nodes, pair_h = torch.cat((q1, y1), dim=-1)
, q1 are hyperedge features, y1 are node features. So, I guess whether q1 is the hyperedge feature when nodes features aggregate to hyperedges features?
If the guess is correct? But why self.word_context = nn.Embedding(1, self.out_features)
, instead of self.word_context = nn.Embedding(n_hyperedge, self.out_features)
. Don't we need to distinguish features of hyperedges?
When I use your model to fit MoviewReview datasets which is from TextGCN. I met problem as follows. Thanks a lot in advance~
epoch: 0
start training: 2020-12-16 16:58:18.184139
Traceback (most recent call last):
File "run.py", line 109, in
main()
File "run.py", line 82, in main
train_model(model, train_data, args)
File "/data/yuhai/tc/HyperGAT/model.py", line 114, in train_model
targets, scores = forward(model, alias_inputs, HT, items, targets, node_masks)
File "/data/yuhai/tc/HyperGAT/model.py", line 98, in forward
node = model(items, HT)
File "/home/yuhai/workspace/anaconda3/envs/torch1.4/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data/yuhai/tc/HyperGAT/model.py", line 89, in forward
nodes = self.hgnn(hidden, HT)
File "/home/yuhai/workspace/anaconda3/envs/torch1.4/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data/yuhai/tc/HyperGAT/model.py", line 40, in forward
x = self.gat2(x, H)
File "/home/yuhai/workspace/anaconda3/envs/torch1.4/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data/yuhai/tc/HyperGAT/layers.py", line 102, in forward
assert not torch.isnan(pair_e).any()
AssertionError
Thanks your work!
I want to implement on my own Chinese data.
May I asked how to generate LDA.p data?
I have generate tcorpus and label.
Thanks!
Your paper is very good. I want to reproduce the experiment in your paper. When do you expose the code?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.