Package elki.evaluation.scores
Class AUPRCEvaluation
- java.lang.Object
-
- elki.evaluation.scores.AUPRCEvaluation
-
- All Implemented Interfaces:
ScoreEvaluation
@Reference(authors="J. Davis and M. Goadrich",title="The relationship between Precision-Recall and ROC curves",booktitle="Proc. 23rd Int. Conf. Machine Learning (ICML)",url="https://doi.org/10.1145/1143844.1143874",bibkey="DBLP:conf/icml/DavisG06") @Reference(authors="T. Saito and M. Rehmsmeier",title="The Precision-Recall Plot is More Informative than the ROC Plot When Evaluating Binary Classifiers on Imbalanced Datasets",booktitle="PLoS ONE 10(3)",url="https://doi.org/10.1371/journal.pone.0118432",bibkey="doi:10.1371/journal.pone.0118432") public class AUPRCEvaluation extends java.lang.Object implements ScoreEvaluation
Compute the area under the precision-recall curve (AUPRC).References:
J. Davis and M. Goadrich
The relationship between Precision-Recall and ROC curves
Proc. 23rd Int. Conf. Machine Learning (ICML)T. Saito and M. Rehmsmeier
The Precision-Recall Plot is More Informative than the ROC Plot When Evaluating Binary Classifiers on Imbalanced Datasets
PLoS ONE 10(3)- Since:
- 0.8.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AUPRCEvaluation.Par
Parameterization class.static class
AUPRCEvaluation.PRCurve
ROC Curve-
Nested classes/interfaces inherited from interface elki.evaluation.scores.ScoreEvaluation
ScoreEvaluation.Adapter
-
-
Field Summary
Fields Modifier and Type Field Description static AUPRCEvaluation
STATIC
Static instance
-
Constructor Summary
Constructors Constructor Description AUPRCEvaluation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static double
computeAUPRC(ScoreEvaluation.Adapter adapter)
Compute the area under the PR curve given a set of positive IDs and a sorted list of (comparable, ID)s, where the comparable object is used to decided when two objects are interchangeable.double
evaluate(ScoreEvaluation.Adapter adapter)
Evaluate a given predicate and iterator.double
expected(int pos, int all)
Expected score for a random result.static AUPRCEvaluation.PRCurve
materializePRC(ScoreEvaluation.Adapter adapter)
Compute the PR 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 AUPRCEvaluation 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
-
materializePRC
public static AUPRCEvaluation.PRCurve materializePRC(ScoreEvaluation.Adapter adapter)
Compute the PR curve given a predicate function and an iterator.- Parameters:
adapter
- Adapter for different input data types- Returns:
- area under curve
-
computeAUPRC
public static double computeAUPRC(ScoreEvaluation.Adapter adapter)
Compute the area under the PR curve given a set of positive IDs and a sorted list of (comparable, ID)s, where the comparable object is used to decided when two objects are interchangeable.- Parameters:
adapter
- Adapter for different input data types- Returns:
- area under curve
-
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
-
-