Skip to content

Commit

Permalink
Merge pull request #104 from STayinloves/master
Browse files Browse the repository at this point in the history
Fix incorrect relation type measurement
  • Loading branch information
samuelbroscheit authored May 23, 2020
2 parents 71c96ab + 5dcceb4 commit 1ec6a1d
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 1ec6a1d

Please sign in to comment.