All Superinterfaces:
NamedWriteable, ToXContent, ToXContentObject, Writeable
All Known Implementing Classes:
AbstractAucRoc, Accuracy, AucRoc, AucRoc, ConfusionMatrix, Huber, MeanSquaredError, MeanSquaredLogarithmicError, MulticlassConfusionMatrix, Precision, Precision, Recall, Recall, RSquared

public interface EvaluationMetric extends ToXContentObject, NamedWriteable
EvaluationMetric class represents a metric to evaluate.
  • Method Details

    • getName

      String getName()
      Returns the name of the metric (which may differ to the writeable name)
    • getRequiredFields

      Set<String> getRequiredFields()
      Returns the set of fields that this metric requires in order to be calculated.
    • aggs

      Builds the aggregation that collect required data to compute the metric
      Parameters:
      parameters - settings that may be needed by aggregations
      fields - fields that may be needed by aggregations
      Returns:
      the aggregations required to compute the metric
    • process

      void process(InternalAggregations aggs)
      Processes given aggregations as a step towards computing result
      Parameters:
      aggs - aggregations from SearchResponse
    • getResult

      Optional<? extends EvaluationMetricResult> getResult()
      Gets the evaluation result for this metric.
      Returns:
      Optional.empty() if the result is not available yet, Optional.of(result) otherwise