public final class ClassificationMetrics extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ClassificationMetrics.Stats |
Constructor and Description |
---|
ClassificationMetrics(int truePositive,
int trueNegative,
int falsePositive,
int falseNegative)
Constructs a new measure using arguments
TODO: add class to which measure corresponds?
|
Modifier and Type | Method and Description |
---|---|
static ClassificationMetrics.Stats |
average(ClassificationMetrics[] results) |
static ClassificationMetrics[] |
createFromMatrix(ConfusionMatrix confusionMatrix) |
double |
getAccuracy()
Calculate and return classification accuracy measure.
|
double |
getBalancedClassificationRate() |
String |
getClassLabel()
Returns class label for
|
double |
getErrorRate()
A number of wrong predictions made divided by the total number of predictions made.
|
double |
getFalseDiscoveryRate() |
double |
getFalseNegativeRate() |
double |
getFalsePositiveRate() |
double |
getFMeasure()
Calculates F-score for beta equal to 1.
|
double |
getFMeasure(int beta)
Returns the F-score.
|
double |
getMatthewsCorrelationCoefficient() |
double |
getPrecision()
Calculate and return classification precision measure.
|
double |
getQ9() |
double |
getRecall() |
double |
getSensitivity()
Calculate and return classification sensitivity (recall, true positive rate)
number of correctly classified positive examples divided by the total number of actual positive examples
|
double |
getSpecificity()
Specifity , true negative rate
|
double |
getTotal()
Returns total number of classifications.
|
void |
setClassLabel(String classLabel) |
String |
toString() |
public ClassificationMetrics(int truePositive, int trueNegative, int falsePositive, int falseNegative)
truePositive
- trueNegative
- falsePositive
- falseNegative
- public String getClassLabel()
public void setClassLabel(String classLabel)
public double getAccuracy()
public double getErrorRate()
public double getPrecision()
public double getSensitivity()
public double getRecall()
public double getSpecificity()
public double getTotal()
public double getFalsePositiveRate()
public double getFalseNegativeRate()
public double getFalseDiscoveryRate()
public double getMatthewsCorrelationCoefficient()
public double getFMeasure()
public double getFMeasure(int beta)
beta
- public double getQ9()
public double getBalancedClassificationRate()
public static ClassificationMetrics[] createFromMatrix(ConfusionMatrix confusionMatrix)
public static ClassificationMetrics.Stats average(ClassificationMetrics[] results)
results
- list of different metric results computed on different sets of dataCopyright © 2019 Neuroph Project. All rights reserved.