public class FMeasure extends Heuristic
ConfusionMatrix. The
F-Measure trades-off precision (if beta = 0) and recall (if m approaches Double.POSITIVE_INFINITY).Heuristic.Comparator<T extends Measurable>| Constructor and Description |
|---|
FMeasure()
Creates the default f-measure with the beta-parameter set to 1 (also known as F1-measure).
|
FMeasure(double beta)
Creates a new f-measure with a specific beta-parameter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
double |
evaluate(@NotNull ConfusionMatrix confusionMatrix)
Calculates a heuristic values based on a
ConfusionMatrix. |
double |
getBeta()
Returns the value of the beta-parameter.
|
int |
hashCode() |
boolean |
isGainMetric()
Returns, whether the heuristic is a gain metric, i.e.
|
double |
maxValue()
Returns the maximum heuristic value that may be calculated by the heuristic.
|
double |
minValue()
Returns the minimum heuristic value that may be calculated by the heuristic.
|
java.lang.String |
toString() |
evaluate, isLossMetricpublic FMeasure()
public FMeasure(double beta)
beta - The value of the beta-parameterpublic double getBeta()
public double evaluate(@NotNull
@NotNull ConfusionMatrix confusionMatrix)
HeuristicConfusionMatrix.public boolean isGainMetric()
HeuristicisGainMetric in class Heuristicpublic double maxValue()
Heuristicpublic double minValue()
Heuristicpublic java.lang.String toString()
toString in class java.lang.Object