Package elki.evaluation.scores
Class PrecisionAtKEvaluation
- java.lang.Object
-
- elki.evaluation.scores.PrecisionAtKEvaluation
-
- All Implemented Interfaces:
ScoreEvaluation
public class PrecisionAtKEvaluation extends java.lang.Object implements ScoreEvaluation
Evaluate using Precision@k, or R-precision (whenk=0
).When
k=0
, then it is set to the number of positive objects, and the returned value is the R-precision, or the precision-recall break-even-point (BEP).- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PrecisionAtKEvaluation.Par
Parameterization class.-
Nested classes/interfaces inherited from interface elki.evaluation.scores.ScoreEvaluation
ScoreEvaluation.Adapter
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
k
Parameter k.static PrecisionAtKEvaluation
RPRECISION
Static instance
-
Constructor Summary
Constructors Constructor Description PrecisionAtKEvaluation(int k)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
RPRECISION
public static final PrecisionAtKEvaluation RPRECISION
Static instance
-
k
int k
Parameter k.
-
-
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
-
-