org.mymedialite.eval.measures
Class ReciprocalRank

java.lang.Object
  extended by org.mymedialite.eval.measures.ReciprocalRank

public class ReciprocalRank
extends java.lang.Object

The reciprocal rank of a list of ranked items. See http://en.wikipedia.org/wiki/Mean_reciprocal_rank Literature: E.M. Voorhees "Proceedings of the 8th Text Retrieval Conference". TREC-8 Question Answering Track Report. 1999. http://gate.ac.uk/sale/dd/related-work/qa/TREC+1999+TREC-8+QA+Report.pdf


Method Summary
static double compute(java.util.List<java.lang.Integer> ranked_items, java.util.Collection<java.lang.Integer> correct_items, java.util.Collection<java.lang.Integer> ignore_items)
          Compute the reciprocal rank of a list of ranked items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compute

public static double compute(java.util.List<java.lang.Integer> ranked_items,
                             java.util.Collection<java.lang.Integer> correct_items,
                             java.util.Collection<java.lang.Integer> ignore_items)
Compute the reciprocal rank of a list of ranked items. See http://en.wikipedia.org/wiki/Mean_reciprocal_rank

Parameters:
ranked_items - a list of ranked item IDs, the highest-ranking item first
correct_items - a collection of positive/correct item IDs
ignore_items - a collection of item IDs which should be ignored for the evaluation
Returns:
the mean reciprocal rank for the given data