Interface EvaluationMetric<T extends Output<T>, C extends MetricContext<T>>
- Type Parameters:
T- The output type.C- The context (information necessary to calculate this metric).
- All Known Implementing Classes:
AnomalyMetric,ClusteringMetric,LabelMetric,MultiLabelMetric,RegressionMetric
public interface EvaluationMetric<T extends Output<T>, C extends MetricContext<T>>
A metric that can be calculated for the specified output type.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSpecifies what form of average to use for aEvaluationMetric. -
Method Summary
Modifier and TypeMethodDescriptiondoubleCompute the result of this metric from the input context.createContext(Model<T> model, List<Prediction<T>> predictions) Creates the context this metric uses to compute it's value.default CcreateContext(Model<T> model, Dataset<T> dataset) Creates the metric context used to compute this metric's value, generatingPredictions for eachExamplein the supplied dataset.getID()The metric ID, a combination of the metric target and metric name.getName()The name of this metric.The target for this metric instance.
-
Method Details
-
compute
-
getTarget
-
getName
-
getID
-
createContext
Creates the context this metric uses to compute it's value.- Parameters:
model- The model to use.predictions- The predictions to use.- Returns:
- The metric context.
-
createContext
Creates the metric context used to compute this metric's value, generatingPredictions for eachExamplein the supplied dataset.- Parameters:
model- The model to use.dataset- The dataset to predict outputs for.- Returns:
- The metric context.
-