Package elki.evaluation.scores
Class ROCEvaluation
- java.lang.Object
-
- elki.evaluation.scores.ROCEvaluation
-
- All Implemented Interfaces:
ScoreEvaluation
public class ROCEvaluation extends java.lang.Object implements ScoreEvaluation
Compute ROC (Receiver Operating Characteristics) curves.A ROC curve compares the true positive rate (y-axis) and false positive rate (x-axis).
It was first used in radio signal detection, but has since found widespread use in information retrieval, in particular for evaluating binary classification problems.
ROC curves are particularly useful to evaluate a ranking of objects with respect to a binary classification problem: a random sampling will approximately achieve a ROC value of 0.5, while a perfect separation will achieve 1.0 (all positives first) or 0.0 (all negatives first). In most use cases, a score significantly below 0.5 indicates that the algorithm result has been used the wrong way, and should be used backwards.
- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classROCEvaluation.ParParameterization class.static classROCEvaluation.ROCurveROC Curve-
Nested classes/interfaces inherited from interface elki.evaluation.scores.ScoreEvaluation
ScoreEvaluation.Adapter
-
-
Field Summary
Fields Modifier and Type Field Description static ROCEvaluationSTATICStatic instance
-
Constructor Summary
Constructors Constructor Description ROCEvaluation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static doublecomputeAUROC(ScoreEvaluation.Adapter adapter)Compute the area under the ROC 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.doubleevaluate(ScoreEvaluation.Adapter adapter)Evaluate a given predicate and iterator.doubleexpected(int pos, int all)Expected score for a random result.static ROCEvaluation.ROCurvematerializeROC(ScoreEvaluation.Adapter adapter)Compute a ROC 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.-
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 ROCEvaluation STATIC
Static instance
-
-
Method Detail
-
evaluate
public double evaluate(ScoreEvaluation.Adapter adapter)
Description copied from interface:ScoreEvaluationEvaluate a given predicate and iterator.- Specified by:
evaluatein interfaceScoreEvaluation- Parameters:
adapter- Input data adapter- Returns:
- Score
-
materializeROC
public static ROCEvaluation.ROCurve materializeROC(ScoreEvaluation.Adapter adapter)
Compute a ROC 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
-
computeAUROC
public static double computeAUROC(ScoreEvaluation.Adapter adapter)
Compute the area under the ROC 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:ScoreEvaluationExpected score for a random result.- Specified by:
expectedin interfaceScoreEvaluation- Parameters:
pos- Number of positive elementsall- Total number of elements- Returns:
- Expected score
-
-