public abstract class AbstractBinaryConfusionMatrix extends AbstractConfusionMatrix<java.lang.Boolean> implements BinaryConfusionMatrix
BinaryConfusionMatrix interface.
Takes care of a lot of the general operations from the interface so that
extending classes only need to focus on the data structure implementation.| Constructor and Description |
|---|
AbstractBinaryConfusionMatrix()
Creates a new
AbstractBinaryConfusionMatrix. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.Boolean> |
getActualCategories()
Gets the set of all the actual categories.
|
double |
getActualCount(java.lang.Boolean target)
Gets the total number of entries for the given actual category.
|
java.util.Set<java.lang.Boolean> |
getCategories()
Gets the set of all categories in the confusion matrix.
|
double |
getCount(java.lang.Boolean target,
java.lang.Boolean estimate)
Gets the entry in the matrix for the given actual and predicted
categories, which is the count of the number of times the predicted
category was given for the given actual category.
|
double |
getFalseNegativesFraction()
Gets the fraction of false negatives.
|
double |
getFalsePositivesFraction()
Gets the fraction of false positives.
|
double |
getFScore()
The F-score of the confusion matrix, which is also known as the
F1-score or F-measure.
|
double |
getFScore(double beta)
The F-score for the confusion matrix with the given trade-off parameter
(beta).
|
double |
getPrecision()
The precision value for the confusion matrix.
|
java.util.Set<java.lang.Boolean> |
getPredictedCategories()
Gets the set of all the predicted categories.
|
java.util.Set<java.lang.Boolean> |
getPredictedCategories(java.lang.Boolean target)
Gets the predicted categories for a given actual category.
|
double |
getRecall()
The recall value for the confusion matrix.
|
double |
getSensitivity()
The sensitivity value for the confusion matrix.
|
double |
getSpecificity()
The specificity value for the confusion matrix.
|
double |
getTrueNegativesFraction()
Gets the fraction of true negatives.
|
double |
getTruePositivesFraction()
Gets the fraction of true positives.
|
add, addAll, getAccuracy, getAverageCategoryAccuracy, getAverageCategoryErrorRate, getCategoryAccuracy, getCategoryErrorRate, getErrorRate, getPredictedCount, getTotalCorrectCount, getTotalCount, getTotalIncorrectCount, isEmptycloneequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFalseNegativesCount, getFalsePositivesCount, getTrueNegativesCount, getTruePositivesCountadd, add, addAll, clear, getAccuracy, getAverageCategoryAccuracy, getAverageCategoryErrorRate, getCategoryAccuracy, getCategoryErrorRate, getErrorRate, getPredictedCount, getTotalCorrectCount, getTotalCount, getTotalIncorrectCount, isEmptyclonepublic AbstractBinaryConfusionMatrix()
AbstractBinaryConfusionMatrix.public java.util.Set<java.lang.Boolean> getCategories()
ConfusionMatrixgetCategories in interface ConfusionMatrix<java.lang.Boolean>public java.util.Set<java.lang.Boolean> getActualCategories()
ConfusionMatrixgetActualCategories in interface ConfusionMatrix<java.lang.Boolean>public java.util.Set<java.lang.Boolean> getPredictedCategories()
ConfusionMatrixgetPredictedCategories in interface ConfusionMatrix<java.lang.Boolean>public java.util.Set<java.lang.Boolean> getPredictedCategories(java.lang.Boolean target)
ConfusionMatrixgetPredictedCategories in interface ConfusionMatrix<java.lang.Boolean>target - The actual category to get the set of prediction categories for.public double getCount(java.lang.Boolean target,
java.lang.Boolean estimate)
ConfusionMatrixgetCount in interface ConfusionMatrix<java.lang.Boolean>target - The actual category.estimate - The predicted category.public double getActualCount(java.lang.Boolean target)
ConfusionMatrixgetActualCount in interface ConfusionMatrix<java.lang.Boolean>getActualCount in class AbstractConfusionMatrix<java.lang.Boolean>target - The actual category.public double getTruePositivesFraction()
BinaryConfusionMatrixgetTruePositivesFraction in interface BinaryConfusionMatrixpublic double getFalsePositivesFraction()
BinaryConfusionMatrixgetFalsePositivesFraction in interface BinaryConfusionMatrixpublic double getTrueNegativesFraction()
BinaryConfusionMatrixgetTrueNegativesFraction in interface BinaryConfusionMatrixpublic double getFalseNegativesFraction()
BinaryConfusionMatrixgetFalseNegativesFraction in interface BinaryConfusionMatrixpublic double getSensitivity()
BinaryConfusionMatrixgetSensitivity in interface BinaryConfusionMatrixpublic double getSpecificity()
BinaryConfusionMatrixgetSpecificity in interface BinaryConfusionMatrixpublic double getPrecision()
BinaryConfusionMatrixgetPrecision in interface BinaryConfusionMatrixpublic double getRecall()
BinaryConfusionMatrixgetRecall in interface BinaryConfusionMatrixpublic double getFScore()
BinaryConfusionMatrixgetFScore in interface BinaryConfusionMatrixpublic double getFScore(double beta)
BinaryConfusionMatrixgetFScore in interface BinaryConfusionMatrixbeta - The beta value of the score. It is the importance assigned to
precision as compared to recall.