Package elki.evaluation.scores
Class NDCGEvaluation
- java.lang.Object
-
- elki.evaluation.scores.NDCGEvaluation
-
- All Implemented Interfaces:
ScoreEvaluation
@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 NDCGEvaluation extends java.lang.Object implements ScoreEvaluation
Normalized Discounted Cumulative Gain.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.
- Since:
- 0.7.5
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NDCGEvaluation.Par
Parameterization class.-
Nested classes/interfaces inherited from interface elki.evaluation.scores.ScoreEvaluation
ScoreEvaluation.Adapter
-
-
Field Summary
Fields Modifier and Type Field Description static NDCGEvaluation
STATIC
Static instance
-
Constructor Summary
Constructors Constructor Description NDCGEvaluation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static double
computeNDCG(ScoreEvaluation.Adapter adapter)
Compute the DCG given a set of positive IDs and a sorted list of entries, which may include ties.double
evaluate(ScoreEvaluation.Adapter adapter)
Evaluate a given predicate and iterator.double
expected(int pos, int all)
Expected score for a random result.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.evaluation.scores.ScoreEvaluation
evaluate
-
-
-
-
Field Detail
-
STATIC
public static final NDCGEvaluation STATIC
Static instance
-
-
Method Detail
-
evaluate
public double evaluate(ScoreEvaluation.Adapter adapter)
Description copied from interface:ScoreEvaluation
Evaluate a given predicate and iterator.- Specified by:
evaluate
in interfaceScoreEvaluation
- Parameters:
adapter
- Input data adapter- Returns:
- Score
-
expected
public double expected(int pos, int all)
Description copied from interface:ScoreEvaluation
Expected score for a random result.- Specified by:
expected
in interfaceScoreEvaluation
- Parameters:
pos
- Number of positive elementsall
- Total number of elements- Returns:
- Expected score
-
computeNDCG
public static double computeNDCG(ScoreEvaluation.Adapter adapter)
Compute the DCG given a set of positive IDs and a sorted list of entries, which may include ties.- Parameters:
adapter
- Adapter for different input data types- Returns:
- area under curve
-
-