deepakn97 / relationPrediction

ACL 2019: Learning Attention-based Embeddings for Relation Prediction in Knowledge Graphs
517 stars 124 forks source link

What is the role of "headTailSelector" in preprocess.py? #19

Closed BittersweetJ closed 4 years ago

BittersweetJ commented 4 years ago

headTailSelector = {} for i in range(len(relation2id)): headTailSelector[i] = 1000 * right_entity_avg[i] / (right_entity_avg[i] + left_entity_avg[i])

I hope you can reply me as soon as possible.Thank you very much!

roholazandie commented 4 years ago

If you track down the code they don't really use it. So you can safely ignore it

chauhanjatin10 commented 4 years ago

Hi @BittersweetJ. This was taken from pre-processing script of the implementation of the original ConvKB paper. This is used for choosing either to replace the head entity or the tail entity when constructing the negative triples. For our work, we have used both types of replacements simultaneously. Hence you can ignore this. @roholazandie, I thank you once again for the all the responses to the issues the readers have raised. Thanks.