Skip to content

Commit

Permalink
Fix wront relation type measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
sanxing-chen committed May 23, 2020
1 parent 71c96ab commit 5dcceb4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kge/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def _get_relation_types(dataset,):
(dataset.index("train_po_to_s"), 0),
]:
for prefix, labels in index.items():
relation_stats[prefix[p], 0 + p * 2] = labels.float().sum()
relation_stats[prefix[p], 0 + p * 2] = (
relation_stats[prefix[p], 0 + p * 2] + len(labels)
)
relation_stats[prefix[p], 1 + p * 2] = (
relation_stats[prefix[p], 1 + p * 2] + 1.0
)
Expand Down

0 comments on commit 5dcceb4

Please sign in to comment.