DeepGraphLearning / KnowledgeGraphEmbedding

MIT License
1.25k stars 265 forks source link

Question about filter_bias = -1 for positive triplets #3

Closed leiloong closed 5 years ago

leiloong commented 5 years ago

In dataloader.py, the filter_bias is set -1 for positive triplets, and score += filter_bias in model.py is find to filter the rank.

It seems the score of a triplet may be in a large range (at least the range is much larger than 1). I noticed the small filter_bias really works (Both TransE and Rotate), it gets the same result when set filter_bias = -100.

But, why the small filter_bias "filter_bias = -1" can work?

Edward-Sun commented 5 years ago

Besides "filter_bias = -1", we replace all true triples with the current evaluated triple.

As we have discussed it in on WeChat, please allow me to close this issue.

tonygracious commented 4 years ago

Besides "filter_bias = -1", we replace all true triples with the current evaluated triple.

As we have discussed it in on WeChat, please allow me to close this issue.

Can you please explain why you used filter_bias ? What is the logic behind it ?