Class LabelMetric
java.lang.Object
org.tribuo.classification.evaluation.LabelMetric
- All Implemented Interfaces:
EvaluationMetric<Label,LabelMetric.Context>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe context for aLabelMetricis aConfusionMatrix.Nested classes/interfaces inherited from interface org.tribuo.evaluation.metrics.EvaluationMetric
EvaluationMetric.Average -
Constructor Summary
ConstructorsConstructorDescriptionLabelMetric(MetricTarget<Label> tgt, String name, ToDoubleBiFunction<MetricTarget<Label>, LabelMetric.Context> impl) Construct a newLabelMetricfor the supplied metric target, using the supplied function. -
Method Summary
Modifier and TypeMethodDescriptiondoublecompute(LabelMetric.Context context) createContext(Model<Label> model, List<Prediction<Label>> predictions) booleangetName()inthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.tribuo.evaluation.metrics.EvaluationMetric
createContext, getID
-
Constructor Details
-
LabelMetric
public LabelMetric(MetricTarget<Label> tgt, String name, ToDoubleBiFunction<MetricTarget<Label>, LabelMetric.Context> impl) Construct a newLabelMetricfor the supplied metric target, using the supplied function.- Parameters:
tgt- The metric target.name- The name of the metric.impl- The implementing function.
-
-
Method Details
-
compute
- Specified by:
computein interfaceEvaluationMetric<Label,LabelMetric.Context>
-
getTarget
- Specified by:
getTargetin interfaceEvaluationMetric<Label,LabelMetric.Context>
-
getName
- Specified by:
getNamein interfaceEvaluationMetric<Label,LabelMetric.Context>
-
equals
-
hashCode
-
toString
-
createContext
- Specified by:
createContextin interfaceEvaluationMetric<Label,LabelMetric.Context>
-