DeepGraphLearning / KnowledgeGraphEmbedding

MIT License
1.24k stars 264 forks source link

confused about implementation of 1-1, 1-n, n-1, n-n #47

Closed junkangwu closed 3 years ago

junkangwu commented 3 years ago

hi, thanks a lot for your work in knowledge graph completion, but I still am confused about the implementation of the table9 in your paper.

  1. as for the relation category, Following Wang et al. (2014), for each relation r, we compute the average number of tails per head (tphr) and the average number of head per tail (hptr). If tphr < 1.5 and hptr < 1.5, r is treated as one-to-one; if tphr ≥ 1.5 and hptr ≥ 1.5, r is treated as a many-to-many; if tphr < 1.5 and hptr ≥ 1.5, r is treated as one-to-many. So should we take the valid dataset and test dataset into consideration in this process? Or should we only classify them in the training dataset?
  2. take tail prediction in the 1-n relation category as an example, should we choose all 1-n relations prediction scores and take all the results into mean? I'm confused to re-implement this part of the experiment. It would be best if you could take a script as an example. Thanks a lot in advance!
Edward-Sun commented 3 years ago

Hi, you can obtain the 1-1, 1-n, n-1, n-n data at the OpenKE repository: https://github.com/thunlp/OpenKE/tree/master/benchmarks