Guest User

Untitled

a guest
May 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. def mean_reciprocal_rank(score_list, answer):
  2. mrr = 0
  3. for item in score_list:
  4. if item[0] == answer:
  5. mrr += (1 / (score_list.index(item)+1))
  6.  
  7. return mrr/len(score_list)
Add Comment
Please, Sign In to add comment