Package ciir.umass.edu.metric
Class BestAtKScorer
- java.lang.Object
-
- ciir.umass.edu.metric.MetricScorer
-
- ciir.umass.edu.metric.BestAtKScorer
-
public class BestAtKScorer extends MetricScorer
- Author:
- vdang
-
-
Field Summary
-
Fields inherited from class ciir.umass.edu.metric.MetricScorer
k
-
-
Constructor Summary
Constructors Constructor Description BestAtKScorer()BestAtKScorer(int k)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricScorercopy()intmaxToK(RankList rl, int k)Return the position of the best object (e.g.java.lang.Stringname()doublescore(RankList rl)double[][]swapChange(RankList rl)-
Methods inherited from class ciir.umass.edu.metric.MetricScorer
getK, getRelevanceLabels, loadExternalRelevanceJudgment, score, setK
-
-
-
-
Method Detail
-
score
public double score(RankList rl)
- Specified by:
scorein classMetricScorer
-
copy
public MetricScorer copy()
- Specified by:
copyin classMetricScorer
-
maxToK
public int maxToK(RankList rl, int k)
Return the position of the best object (e.g. docs with highest degree of relevance) among objects in the range [0..k] NOTE: If you want best-at-k (i.e. best among top-k), you need maxToK(rl, k-1)- Parameters:
l- The rank list.k- The last position of the range.- Returns:
- The index of the best object in the specified range.
-
name
public java.lang.String name()
- Specified by:
namein classMetricScorer
-
swapChange
public double[][] swapChange(RankList rl)
- Specified by:
swapChangein classMetricScorer
-
-