public class MultiLabelMetric extends Object implements EvaluationMetric<MultiLabel,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context>
EvaluationMetric
for evaluating MultiLabel
problems.
The sufficient statistics used must be held in a ConfusionMatrix
.EvaluationMetric.Average
Constructor and Description |
---|
MultiLabelMetric(MetricTarget<MultiLabel> target,
String name,
BiFunction<MetricTarget<MultiLabel>,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context,Double> impl) |
Modifier and Type | Method and Description |
---|---|
double |
compute(org.tribuo.multilabel.evaluation.MultiLabelMetric.Context context)
Compute the result of this metric from the input context.
|
org.tribuo.multilabel.evaluation.MultiLabelMetric.Context |
createContext(Model<MultiLabel> model,
List<Prediction<MultiLabel>> predictions)
Creates the context this metric uses to compute it's value.
|
boolean |
equals(Object o) |
String |
getName()
The name of this metric.
|
MetricTarget<MultiLabel> |
getTarget()
The target for this metric instance.
|
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
createContext, getID
public MultiLabelMetric(MetricTarget<MultiLabel> target, String name, BiFunction<MetricTarget<MultiLabel>,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context,Double> impl)
public MetricTarget<MultiLabel> getTarget()
EvaluationMetric
getTarget
in interface EvaluationMetric<MultiLabel,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context>
public String getName()
EvaluationMetric
getName
in interface EvaluationMetric<MultiLabel,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context>
public double compute(org.tribuo.multilabel.evaluation.MultiLabelMetric.Context context)
EvaluationMetric
compute
in interface EvaluationMetric<MultiLabel,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context>
context
- The context to use.public org.tribuo.multilabel.evaluation.MultiLabelMetric.Context createContext(Model<MultiLabel> model, List<Prediction<MultiLabel>> predictions)
EvaluationMetric
createContext
in interface EvaluationMetric<MultiLabel,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context>
model
- The model to use.predictions
- The predictions to use.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.