Giter VIP home page Giter VIP logo

hypergat_textclassification's People

Contributors

kaize0409 avatar wangjlgz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hypergat_textclassification's Issues

LDA topic number selection and Can the model use on multi label classification task?

@kaize0409

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 ?

Remaining 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

Code problem

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

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?

NAN problem when fit MovieReview datasets

When I use your model to fit MoviewReview datasets which is from TextGCN. I met problem as follows. Thanks a lot in advance~

min_len_of_sentence : 0
max_len_of_sentence : 27
min_num_of_sentence : 1
max_num_of_sentence : 5
average_len_of_sentence: 9.062759575449931
average_num_of_sentence: 1.0162258488088538
Total_num_of_sentence : 10835
Counter({'1': 5331, '0': 5331})
Total_number_of_words: 4284
Total_number_of_categories: 2

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

How to generate LDA?

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!

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.