yao8839836 / text_gcn

Graph Convolutional Networks for Text Classification. AAAI 2019
1.35k stars 434 forks source link

Prediction probability #101

Open cr019283 opened 4 years ago

cr019283 commented 4 years ago

I really like your project and paper. So I have been wondering if the model support prediction probability? If yes how could I read it in addition to the predicted labels. I simply would like to learn about confidence of FPs and FNs.

yao8839836 commented 4 years ago

@cr019283

Thank you.

In train.py , you can replace "model.layers[0].embedding" in line 120 with "model.layers[1].embedding", then "test_doc_embeddings " in line 163 will be the embedding matrix for test docs, and the dimension of the embedding will be the number of classes, you can feed the embedding into a softmax/sigmoid function to compute prediction probabilities.

cr019283 commented 4 years ago

Thank you for your response. I did exactly what was suggested and it it worked perfectly. It looks like the FPs that I'm getting are of quite high confidence but it's a separate matter.