daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest May 16th, 2018 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top