Class MetricContext<T extends Output<T>>

java.lang.Object
org.tribuo.evaluation.metrics.MetricContext<T>
Direct Known Subclasses:
LabelMetric.Context

public abstract class MetricContext<T extends Output<T>> extends Object
The context for a metric or set of metrics. At minimum the model used to generate the predictions, and the predictions themselves.
  • Constructor Details

  • Method Details

    • getModel

      public Model<T> getModel()
      Gets the Model used by this context.
      Returns:
      The model, or null if this MetricContext operates on a SequenceModel.
    • getSequenceModel

      public SequenceModel<T> getSequenceModel()
      Gets the SequenceModel used by this context.
      Returns:
      The model, or null if this MetricContext operates on a Model.
    • getPredictions

      public List<Prediction<T>> getPredictions()
      Gets the predictions used by this context.
      Returns:
      The predictions.