Skip to content

Commit

Permalink
Remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adelmemariani committed Jan 22, 2025
1 parent c1d955c commit 7cad63f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions dicee/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,8 @@ def evaluate_lp_k_vs_all(self, model, triple_idx, info=None, form_of_labelling=N
# (5) Sort predictions.
sort_values, sort_idxs = torch.sort(predictions, dim=1, descending=True)

#probabilities = torch.sigmoid(sort_values)
#non_zero_probs = probabilities[probabilities != 0.0]
#one_minus_non_zero_probs = 1 - non_zero_probs

non_zero_probs = sort_values[sort_values != 0.0]
probabilities = torch.sigmoid(non_zero_probs)
non_zero_values = sort_values[sort_values != 0.0]
probabilities = torch.sigmoid(non_zero_values)
one_minus_non_zero_probs = 1 - probabilities

ECE = one_minus_non_zero_probs.sum().item()
Expand Down

0 comments on commit 7cad63f

Please sign in to comment.