T
- The output type.C
- The context (information necessary to calculate this metric).public interface EvaluationMetric<T extends Output<T>,C extends MetricContext<T>>
Modifier and Type | Interface and Description |
---|---|
static class |
EvaluationMetric.Average
Specifies what form of average to use for a
EvaluationMetric . |
Modifier and Type | Method and Description |
---|---|
double |
compute(C context)
Compute the result of this metric from the input context.
|
default C |
createContext(Model<T> model,
Dataset<T> dataset)
Creates the metric context used to compute this metric's value,
generating
Prediction s for each Example in
the supplied dataset. |
C |
createContext(Model<T> model,
List<Prediction<T>> predictions)
Creates the context this metric uses to compute it's value.
|
default MetricID<T> |
getID()
The metric ID, a combination of the metric target and metric name.
|
String |
getName()
The name of this metric.
|
MetricTarget<T> |
getTarget()
The target for this metric instance.
|
double compute(C context)
context
- The context to use.MetricTarget<T> getTarget()
String getName()
default MetricID<T> getID()
C createContext(Model<T> model, List<Prediction<T>> predictions)
model
- The model to use.predictions
- The predictions to use.default C createContext(Model<T> model, Dataset<T> dataset)
Prediction
s for each Example
in
the supplied dataset.model
- The model to use.dataset
- The dataset to predict outputs for.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.