onehaitao / Att-BLSTM-relation-extraction

Implementation of Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification.
MIT License
76 stars 17 forks source link

Precison and Recall Misplaced #4

Closed HaishuoFang closed 3 years ago

HaishuoFang commented 3 years ago

If rows of confusion matrix are prediction and columns are labels, it seems they are misplaced.

https://github.com/onehaitao/Att-BLSTM-relation-extraction/blob/90db24659ec92442c0693cd086af8ce34691dc50/evaluate.py#L31

onehaitao commented 3 years ago

I printed the precision and recall of all relations, and the result is same as the official script.

HaishuoFang commented 3 years ago

Does the row mean predicted labels or true labels? I think it's a bit weird

onehaitao commented 3 years ago

I review my code and I think that row means the predicted labels, maybe the Perl script is wrong, but it does not affect the final F1.