Package org.tribuo.evaluation.metrics
Class MetricContext<T extends Output<T>>
java.lang.Object
org.tribuo.evaluation.metrics.MetricContext<T>
- Direct Known Subclasses:
LabelMetric.Context
The context for a metric or set of metrics. At minimum the model used to generate
the predictions, and the predictions themselves.
-
Constructor Summary
ModifierConstructorDescriptionprotected
MetricContext
(Model<T> model, List<Prediction<T>> predictions) protected
MetricContext
(SequenceModel<T> model, List<Prediction<T>> predictions) -
Method Summary
Modifier and TypeMethodDescriptiongetModel()
Gets the Model used by this context.List<Prediction<T>>
Gets the predictions used by this context.Gets the SequenceModel used by this context.
-
Constructor Details
-
MetricContext
-
MetricContext
-
-
Method Details
-
getModel
Gets the Model used by this context.- Returns:
- The model, or null if this MetricContext operates on a SequenceModel.
-
getSequenceModel
Gets the SequenceModel used by this context.- Returns:
- The model, or null if this MetricContext operates on a Model.
-
getPredictions
Gets the predictions used by this context.- Returns:
- The predictions.
-