Package elki.evaluation.scores
Class PRGCEvaluation
- java.lang.Object
-
- elki.evaluation.scores.PRGCEvaluation
-
- All Implemented Interfaces:
ScoreEvaluation
@Reference(authors="P. Flach and M. Knull", title="Precision-Recall-Gain Curves: {PR} Analysis Done Right", booktitle="Neural Information Processing Systems (NIPS 2015)", url="http://papers.nips.cc/paper/5867-precision-recall-gain-curves-pr-analysis-done-right", bibkey="DBLP:conf/nips/FlachK15") public class PRGCEvaluation extends java.lang.Object implements ScoreEvaluation
Compute the area under the precision-recall-gain curveReferences:
P. Flach and M. Knull
Precision-Recall-Gain Curves: PR Analysis Done Right
Neural Information Processing Systems (NIPS 2015)- Since:
- 0.8.0
- Author:
- Robert Gehde, Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PRGCEvaluation.Par
Parameterization class.static class
PRGCEvaluation.PRGCurve
Precision-Recall-Gain curve.-
Nested classes/interfaces inherited from interface elki.evaluation.scores.ScoreEvaluation
ScoreEvaluation.Adapter
-
-
Field Summary
Fields Modifier and Type Field Description static PRGCEvaluation
STATIC
Static instance
-
Constructor Summary
Constructors Constructor Description PRGCEvaluation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static double
computePRGAUC(ScoreEvaluation.Adapter adapter, PRGCEvaluation.PRGCurve curve)
Compute the precision-recall-gain-curvedouble
evaluate(ScoreEvaluation.Adapter adapter)
Evaluate a given predicate and iterator.double
expected(int pos, int all)
Expected score for a random result.static PRGCEvaluation.PRGCurve
materializePRGC(ScoreEvaluation.Adapter adapter)
Compute the PRG curve given a predicate function and an iterator.-
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 PRGCEvaluation 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
-
materializePRGC
public static PRGCEvaluation.PRGCurve materializePRGC(ScoreEvaluation.Adapter adapter)
Compute the PRG curve given a predicate function and an iterator.- Parameters:
adapter
- Adapter for different input data types- Returns:
- PRG curve
-
computePRGAUC
private static double computePRGAUC(ScoreEvaluation.Adapter adapter, PRGCEvaluation.PRGCurve curve)
Compute the precision-recall-gain-curve- Parameters:
adapter
- Input adaptercurve
- Optional output curve (may benull
)- Returns:
- AUC value
-
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
-
-