Skip to content

Commit

Permalink
Update metrics.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zfan20 authored Aug 7, 2021
1 parent 22069e0 commit 609b153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def auc(ground_truth, prediction):

def mrr(r):
r = np.array(r)
if np.sum(r) == 0.
if np.sum(r) == 0.:
return 0.
else:
return np.reciprocal(np.where(r==1)[0]+1, dtype=np.float)[0]

0 comments on commit 609b153

Please sign in to comment.