org.mymedialite.eval.measures
Class NDCG

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

public class NDCG
extends java.lang.Object

Normalized discounted cumulative gain (NDCG) of a list of ranked items. See http://recsyswiki.com/wiki/Discounted_Cumulative_Gain


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 normalized discounted cumulative gain (NDCG) 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 normalized discounted cumulative gain (NDCG) of a list of ranked items. See http://recsyswiki.com/wiki/Discounted_Cumulative_Gain

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 NDCG for the given data