|
||||||||||
| 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 measure together. |
| Constructor Summary | |
|---|---|
ScoreBasedPerformanceMeasureDefinitions()
|
|
| Method Summary | |
|---|---|
protected static double |
getAUC_PR(double[] scoresClass0,
double[] scoresClass1,
ArrayList<double[]> list)
This method computes the area under the precision recall curve. |
protected static double |
getAUC_ROC(double[] scoresClass0,
double[] scoresClass1,
ArrayList<double[]> list)
This method computes the area under the receiver operator characteristics curve. |
protected static double |
getClassificationRateFor2Classes(double[] scoresClass0,
double[] scoresClass1)
This method computes the classification rate. |
protected static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair |
getFPRForSensitivity(double[] scoresClass0,
double[] scoresClass1,
double sensitivity)
This method computes the false positive rate (FPR) for a given sensitivity. |
protected static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair |
getMaxOfCC(double[] scoresClass0,
double[] scoresClass1)
This method computes the maximal correlation coefficient (CC_max). |
protected static double[][] |
getPartialROC(double[] scoresClass0,
double[] scoresClass1,
RangeParameter specs)
This method allows to compute are partial ROC curve. |
protected static ScoreBasedPerformanceMeasureDefinitions.ThresholdMeasurePair |
getPPVForSensitivity(double[] scoresClass0,
double[] scoresClass1,
double sensitivity)
This method computes the positive predictive value (PPV) for a given sensitivity. |
protected 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 |
|---|
protected 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
protected static double getAUC_PR(double[] scoresClass0,
double[] scoresClass1,
ArrayList<double[]> list)
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
protected static double getAUC_ROC(double[] scoresClass0,
double[] scoresClass1,
ArrayList<double[]> list)
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
protected 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
IllegalArgumentException - if the sensitivity is not in (0,1)
protected 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
IllegalArgumentException - if the sensitivity is not in (0,1)
protected 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)
Exception - if the CC_max can not be computed
protected 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
IllegalArgumentException - if the specificity is not in (0,1)
protected 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 | |||||||||