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

public interface EvaluationMetric extends org.elasticsearch.xcontent.ToXContentObject, NamedWriteable
EvaluationMetric class represents a metric to evaluate.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent

    org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY, EMPTY_PARAMS
  • Method Summary

    Modifier and Type
    Method
    Description
    org.elasticsearch.core.Tuple<List<AggregationBuilder>,List<PipelineAggregationBuilder>>
    Builds the aggregation that collect required data to compute the metric
    Returns the name of the metric (which may differ to the writeable name)
    Returns the set of fields that this metric requires in order to be calculated.
    Gets the evaluation result for this metric.
    void
    Processes given aggregations as a step towards computing result

    Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable

    getWriteableName

    Methods inherited from interface org.elasticsearch.xcontent.ToXContent

    toXContent

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject

    isFragment

    Methods inherited from interface org.elasticsearch.common.io.stream.Writeable

    writeTo
  • 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

      org.elasticsearch.core.Tuple<List<AggregationBuilder>,List<PipelineAggregationBuilder>> aggs(EvaluationParameters parameters, EvaluationFields fields)
      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