intfloat/SimKGC

Negative Sample

qiushuigongchang opened this issue · 2 comments

hi, How can I get a negative sample?If I want to get negative sample,Thanks!

For training, given a triple (head entity, relation, tail entity), simply replacing the head or tail entity with a random one, then you can get a negative sample.

If you mean the samples that the model fails to predict correctly, please check out our model's predictions at https://github.com/intfloat/SimKGC/tree/main/predictions

hi, I'm a little confused, What's the use of triplet_mask in models.py(in line 96)?