|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.classifier.ScoreBasedPerformanceMeasureDefinitions
public class ScoreBasedPerformanceMeasureDefinitions
This class contains the methods that are needed to evaluate a score based 2-class-classifier.
AbstractScoreBasedClassifier,
AbstractClassifier.evaluate(MeasureParameters, boolean, de.jstacs.data.Sample...),
AbstractClassifier.evaluateAll(MeasureParameters, boolean, de.jstacs.data.Sample...),
MeasureParameters| Nested Class Summary | |
|---|---|
static class |
ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair
This class is used as a container that allows to store a threshold and the result of a measure together. |
| Constructor Summary | |
|---|---|
ScoreBasedPerformanceMeasureDefinitions()
|
|
| Method Summary | |
|---|---|
static double |
getAUC_PR(double[] scoresClass0,
double[] scoresClass1,
AbstractList<double[]> list)
This method computes the area under the precision recall curve. |
static double |
getAUC_ROC(double[] scoresClass0,
double[] scoresClass1,
AbstractList<double[]> list)
This method computes the area under the receiver operator characteristics curve. |
static double |
getClassificationRateFor2Classes(double[] scoresClass0,
double[] scoresClass1)
This method computes the classification rate for two classes. |
static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair |
getFPRForSensitivity(double[] scoresClass0,
double[] scoresClass1,
double sensitivity)
This method computes the false positive rate (FPR) for a given sensitivity. |
static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair |
getMaxOfCC(double[] scoresClass0,
double[] scoresClass1)
This method computes the maximal correlation coefficient (CC_max). |
static double[][] |
getPartialROC(double[] scoresClass0,
double[] scoresClass1,
RangeParameter specs)
This method allows to compute a partial ROC curve. |
static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair |
getPPVForSensitivity(double[] scoresClass0,
double[] scoresClass1,
double sensitivity)
This method computes the positive predictive value (PPV) for a given sensitivity. |
static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair |
getSensitivityForSpecificity(double[] scoresClass0,
double[] scoresClass1,
double specificity)
This method computes the sensitivity for a given specificity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScoreBasedPerformanceMeasureDefinitions()
| Method Detail |
|---|
public static double[][] getPartialROC(double[] scoresClass0,
double[] scoresClass1,
RangeParameter specs)
throws ParameterException
scoresClass0 - the scores of class 0 (have to be sorted)scoresClass1 - the scores of class 1 (have to be sorted)specs - these specificities are used as grid for the partial curve
m[0][i] i-th specificity
m[1][i] i-th sensitivity
m[2][i] i-th threshold
ParameterException - if the method RangeParameter.next() throws one
public static double getAUC_PR(double[] scoresClass0,
double[] scoresClass1,
AbstractList<double[]> list)
AbstractList for list, otherwise use null.
scoresClass0 - the scores of class 0 (have to be sorted)scoresClass1 - the scores of class 1 (have to be sorted)list - null or an empty list
public static double getAUC_ROC(double[] scoresClass0,
double[] scoresClass1,
AbstractList<double[]> list)
AbstractList for list, otherwise use
null.
scoresClass0 - the scores of class 0 (have to be sorted)scoresClass1 - the scores of class 1 (have to be sorted)list - null or an empty list
public static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair getFPRForSensitivity(double[] scoresClass0,
double[] scoresClass1,
double sensitivity)
throws IllegalArgumentException
scoresClass0 - the scores of class 0 (have to be sorted)scoresClass1 - the scores of class 1 (have to be sorted)sensitivity - the fixed sensitivity which is used to measure the FPR
ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair containing the threshold and the
FPR
IllegalArgumentException - if the sensitivity is not in [0,1]ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair
public static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair getPPVForSensitivity(double[] scoresClass0,
double[] scoresClass1,
double sensitivity)
throws IllegalArgumentException
scoresClass0 - the scores of class 0 (have to be sorted)scoresClass1 - the scores of class 1 (have to be sorted)sensitivity - the fixed sensitivity which is used to measure the PPV
ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair containing the threshold and the
PPV
IllegalArgumentException - if the sensitivity is not in [0,1]ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair
public static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair getMaxOfCC(double[] scoresClass0,
double[] scoresClass1)
throws Exception
scoresClass0 - the scores of class 0 (have to be sorted)scoresClass1 - the scores of class 1 (have to be sorted)
ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair containing the threshold and the
CC_max
Exception - if the CC_max can not be computedScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair
public static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair getSensitivityForSpecificity(double[] scoresClass0,
double[] scoresClass1,
double specificity)
throws IllegalArgumentException
scoresClass0 - the scores of class 0 (have to be sorted)scoresClass1 - the scores of class 1 (have to be sorted)specificity - the specificity that is used to measure the sensitivity
ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair containing the threshold and the
sensitivity
IllegalArgumentException - if the specificity is not in [0,1]ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair
public static double getClassificationRateFor2Classes(double[] scoresClass0,
double[] scoresClass1)
scoresClass0 - the scores of class 0 (have to be sorted)scoresClass1 - the scores of class 1 (have to be sorted)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||