public static enum ConfusionMatrix.Element extends java.lang.Enum<ConfusionMatrix.Element>
ConfusionMatrix.| Enum Constant and Description |
|---|
FN
Represents a false negative.
|
FP
Represents a false positive.
|
TN
Represents a true negative.
|
TP
Represents a true positive.
|
| Modifier and Type | Method and Description |
|---|---|
static @NotNull ConfusionMatrix.Element |
forPrediction(double prediction,
double groundTruth)
Creates and returns an element of a
ConfusionMatrix for a specific prediction and
the corresponding ground truth. |
boolean |
isCorrectPrediction()
Returns, whether the element represents a correct prediction, or not.
|
boolean |
isNegativeExample()
Returns, whether the element corresponds to a negative example, or not.
|
boolean |
isNegativePrediction()
Returns, whether the element represents a negative prediction, or not.
|
boolean |
isPositiveExample()
Returns, whether the element corresponds to a positive example, or not.
|
boolean |
isPositivePrediction()
Returns, whether the element represents a positive prediction, or not.
|
boolean |
isWrongPrediction()
Returns, whether the element represents a wrong prediction, or not.
|
static ConfusionMatrix.Element |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ConfusionMatrix.Element[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConfusionMatrix.Element TP
public static final ConfusionMatrix.Element FP
public static final ConfusionMatrix.Element TN
public static final ConfusionMatrix.Element FN
public static ConfusionMatrix.Element[] values()
for (ConfusionMatrix.Element c : ConfusionMatrix.Element.values()) System.out.println(c);
public static ConfusionMatrix.Element valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null@NotNull public static @NotNull ConfusionMatrix.Element forPrediction(double prediction, double groundTruth)
ConfusionMatrix for a specific prediction and
the corresponding ground truth.prediction - The prediction that have been madegroundTruth - The ground truthpublic boolean isCorrectPrediction()
public boolean isWrongPrediction()
public boolean isPositivePrediction()
public boolean isNegativePrediction()
public boolean isPositiveExample()
public boolean isNegativeExample()