public class PrecisionAtKEvaluation extends AbstractScoreEvaluation
k=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).Modifier and Type | Class and Description |
---|---|
static class |
PrecisionAtKEvaluation.Parameterizer
Parameterization class.
|
ScoreEvaluation.Predicate<T>, ScoreEvaluation.ScoreIter
Modifier and Type | Field and Description |
---|---|
(package private) int |
k
Parameter k.
|
static PrecisionAtKEvaluation |
RPRECISION
Static instance
|
Constructor and Description |
---|
PrecisionAtKEvaluation(int k)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<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.
|
evaluate, evaluate, evaluate
public static final PrecisionAtKEvaluation RPRECISION
int k
public PrecisionAtKEvaluation(int k)
k
- k to evaluate at. May be 0.public <I extends ScoreEvaluation.ScoreIter> double evaluate(ScoreEvaluation.Predicate<? super I> predicate, I iter)
ScoreEvaluation
I
- Iterator typepredicate
- Predicate (for positives)iter
- Iteratorpublic double expected(int pos, int all)
ScoreEvaluation
pos
- Number of positive elementsall
- Total number of elementsCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.