daiquocnguyen / CapsE

A Capsule Network-based Embedding Model for Knowledge Graph Completion and Search Personalization (NAACL 2019)
Apache License 2.0
144 stars 32 forks source link

Issue about the metric Hits #12

Closed xizero00 closed 4 years ago

xizero00 commented 4 years ago

Hi, Thanks for sharing your great work. I have a question about the calculation of Hits metric which is not consistent with other's implementation. In your project: you use the rankdata function from scipy, it ranks the data by ascending order.

rankdata([0, 2, 3, 2], method='ordinal') 
array([ 1.,  2.,  4.,  3.])

Other project: ranking the score by the descending order.

In your project: https://github.com/daiquocnguyen/CapsE/blob/master/evalCapsE.py#L219-L229 Other project: https://github.com/DeepGraphLearning/KnowledgeGraphEmbedding/blob/master/codes/model.py#L395-L417

You paper says: image