@Reference(authors="K. J\u00e4rvelin, J. Kek\u00e4l\u00e4inen", title="Cumulated gain-based evaluation of IR techniques", booktitle="ACM Transactions on Information Systems (TOIS)", url="https://doi.org/10.1145/582415.582418", bibkey="DBLP:journals/tois/JarvelinK02") public class DCGEvaluation extends java.lang.Object implements ScoreEvaluation
This evaluation metric would be able to use relevance information, but the current implementation is for binary labels only (it is easy to add, but requires API additions or changes).
Reference:
K. Järvelin, J. Kekäläinen
Cumulated gain-based evaluation of IR techniques
ACM Transactions on Information Systems (TOIS)
TODO: support weighted ground truth.
TODO: allow using other logarithms than 2?
Modifier and Type | Class and Description |
---|---|
static class |
DCGEvaluation.Parameterizer
Parameterization class.
|
ScoreEvaluation.Predicate<T>, ScoreEvaluation.ScoreIter
Modifier and Type | Field and Description |
---|---|
static DCGEvaluation |
STATIC
Static instance
|
Constructor and Description |
---|
DCGEvaluation() |
Modifier and Type | Method and Description |
---|---|
static <I extends ScoreEvaluation.ScoreIter> |
computeDCG(ScoreEvaluation.Predicate<? super I> predicate,
I iter)
Compute the DCG given a set of positive IDs and a sorted list of entries,
which may include ties.
|
<I extends ScoreEvaluation.ScoreIter> |
evaluate(ScoreEvaluation.Predicate<? super I> predicate,
I iter)
Evaluate a given predicate and iterator.
|
double |
expected(int pos,
int all)
Expected score for a random result.
|
static double |
maximum(int pos)
Maximum DCG.
|
static double |
sumInvLog1p(int s,
int e)
Compute
\sum_{i=s}^e 1/log(1+i) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluate
public static final DCGEvaluation STATIC
public <I extends ScoreEvaluation.ScoreIter> double evaluate(ScoreEvaluation.Predicate<? super I> predicate, I iter)
ScoreEvaluation
evaluate
in interface ScoreEvaluation
I
- Iterator typepredicate
- Predicate (for positives)iter
- Iteratorpublic double expected(int pos, int all)
ScoreEvaluation
expected
in interface ScoreEvaluation
pos
- Number of positive elementsall
- Total number of elementspublic static double sumInvLog1p(int s, int e)
\sum_{i=s}^e 1/log(1+i)
s
- Start valuee
- End value (inclusive!)public static <I extends ScoreEvaluation.ScoreIter> double computeDCG(ScoreEvaluation.Predicate<? super I> predicate, I iter)
I
- Iterator typepredicate
- Predicate to test for positive objectsiter
- Iterator over results, with ties.public static double maximum(int pos)
pos
- Number of positive objectsCopyright © 2019 ELKI Development Team. License information.