public enum MultiLabelMetrics extends Enum<MultiLabelMetrics>
MultiLabelMetric
s supported by the multi-label classification
evaluation package.Enum Constant and Description |
---|
BALANCED_ERROR_RATE
The balanced error rate, i.e., the mean of the per class recalls.
|
F1
The F_1 score, i.e., the harmonic mean of the precision and the recall.
|
FN
The number of false negatives.
|
FP
The number of false positives.
|
JACCARD_SCORE
The Jaccard score, i.e., the average across the predictions of the intersection over union.
|
PRECISION
The precision, i.e., the number of true positives divided by the number of predicted positives.
|
RECALL
The recall, i.e., the number of true positives divided by the number of ground truth positives.
|
TN
The number of true negatives.
|
TP
The number of true positives.
|
Modifier and Type | Method and Description |
---|---|
MultiLabelMetric |
forTarget(MetricTarget<MultiLabel> tgt)
Get the metric for the supplied target.
|
BiFunction<MetricTarget<MultiLabel>,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context,Double> |
getImpl()
Get the implementation function for this metric.
|
static double |
jaccardScore(List<Prediction<MultiLabel>> predictions)
The average Jaccard score across the predictions.
|
static MultiLabelMetrics |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MultiLabelMetrics[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MultiLabelMetrics TP
public static final MultiLabelMetrics FP
public static final MultiLabelMetrics TN
public static final MultiLabelMetrics FN
public static final MultiLabelMetrics PRECISION
public static final MultiLabelMetrics RECALL
public static final MultiLabelMetrics F1
public static final MultiLabelMetrics BALANCED_ERROR_RATE
public static final MultiLabelMetrics JACCARD_SCORE
public static MultiLabelMetrics[] values()
for (MultiLabelMetrics c : MultiLabelMetrics.values()) System.out.println(c);
public static MultiLabelMetrics valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic BiFunction<MetricTarget<MultiLabel>,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context,Double> getImpl()
public MultiLabelMetric forTarget(MetricTarget<MultiLabel> tgt)
tgt
- The metric target.public static double jaccardScore(List<Prediction<MultiLabel>> predictions)
predictions
- The predictions to use.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.