All Superinterfaces:
org.apache.lucene.util.Accountable, NamedWriteable, NamedXContentObject, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject, Writeable
All Known Subinterfaces:
LenientlyParsedOutputAggregator, StrictlyParsedOutputAggregator
All Known Implementing Classes:
Exponent, LogisticRegression, WeightedMode, WeightedSum

public interface OutputAggregator extends NamedXContentObject, NamedWriteable, org.apache.lucene.util.Accountable
  • 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.apache.lucene.util.Accountable

    NULL_ACCOUNTABLE

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY, EMPTY_PARAMS
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    aggregate(double[] processedValues)
    Function to aggregate the processed values into a single double This may be as simple as returning the index of the maximum value.
    boolean
     
     
     
    double[]
    processValues(double[][] values)
    This pre-processes the values so that they may be passed directly to the aggregate(double[]) method.

    Methods inherited from interface org.apache.lucene.util.Accountable

    getChildResources, ramBytesUsed

    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

    • expectedValueSize

      Integer expectedValueSize()
      Returns:
      The expected size of the values array when aggregating. `null` implies there is no expected size.
    • processValues

      double[] processValues(double[][] values)
      This pre-processes the values so that they may be passed directly to the aggregate(double[]) method. Two major types of pre-processed values could be returned: - The confidence/probability scaled values given the input values (See: WeightedMode.processValues(double[][]) - A simple transformation of the passed values in preparation for aggregation (See: WeightedSum.processValues(double[][])
      Parameters:
      values - the values to process
      Returns:
      A new list containing the processed values or the same list if no processing is required
    • aggregate

      double aggregate(double[] processedValues)
      Function to aggregate the processed values into a single double This may be as simple as returning the index of the maximum value. Or as complex as a mathematical reduction of all the passed values (i.e. summation, average, etc.).
      Parameters:
      processedValues - The values to aggregate
      Returns:
      the aggregated value.
    • getName

      String getName()
      Specified by:
      getName in interface NamedXContentObject
      Returns:
      The name of the output aggregator
    • compatibleWith

      boolean compatibleWith(TargetType targetType)