Package ciir.umass.edu.metric
Class DCGScorer
- java.lang.Object
-
- ciir.umass.edu.metric.MetricScorer
-
- ciir.umass.edu.metric.DCGScorer
-
- Direct Known Subclasses:
NDCGScorer
public class DCGScorer extends MetricScorer
-
-
Field Summary
Fields Modifier and Type Field Description protected static double[]discountprotected static double[]gain-
Fields inherited from class ciir.umass.edu.metric.MetricScorer
k
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricScorercopy()protected doublediscount(int index)protected doublegain(int rel)protected doublegetDCG(int[] rel, int topK)java.lang.Stringname()doublescore(RankList rl)Compute DCG at k.double[][]swapChange(RankList rl)-
Methods inherited from class ciir.umass.edu.metric.MetricScorer
getK, getRelevanceLabels, loadExternalRelevanceJudgment, score, setK
-
-
-
-
Method Detail
-
copy
public MetricScorer copy()
- Specified by:
copyin classMetricScorer
-
score
public double score(RankList rl)
Compute DCG at k.- Specified by:
scorein classMetricScorer
-
swapChange
public double[][] swapChange(RankList rl)
- Specified by:
swapChangein classMetricScorer
-
name
public java.lang.String name()
- Specified by:
namein classMetricScorer
-
getDCG
protected double getDCG(int[] rel, int topK)
-
discount
protected double discount(int index)
-
gain
protected double gain(int rel)
-
-