public class PrecisionAtKEvaluation extends java.lang.Object implements ScoreEvaluation
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
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 elementsCopyright © 2019 ELKI Development Team. License information.