Class InternalMatrixStats

java.lang.Object
org.elasticsearch.search.aggregations.InternalAggregation
org.elasticsearch.search.aggregations.matrix.stats.InternalMatrixStats
All Implemented Interfaces:
org.elasticsearch.common.io.stream.NamedWriteable, org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.search.aggregations.Aggregation, MatrixStats, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentFragment

public class InternalMatrixStats extends org.elasticsearch.search.aggregations.InternalAggregation implements MatrixStats
Computes distribution statistics over multiple fields
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalAggregation

    org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext, org.elasticsearch.search.aggregations.InternalAggregation.ReduceContextBuilder

    Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation

    org.elasticsearch.search.aggregations.Aggregation.CommonFields

    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

    org.elasticsearch.common.io.stream.Writeable.Reader<V extends Object>, org.elasticsearch.common.io.stream.Writeable.Writer<V extends Object>
  • Field Summary

    Fields inherited from class org.elasticsearch.search.aggregations.InternalAggregation

    metadata, name

    Fields inherited from interface org.elasticsearch.search.aggregations.Aggregation

    TYPED_KEYS_DELIMITER

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    InternalMatrixStats(org.elasticsearch.common.io.stream.StreamInput in)
    Read from a stream.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doWriteTo(org.elasticsearch.common.io.stream.StreamOutput out)
     
    org.elasticsearch.xcontent.XContentBuilder
    doXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
     
    boolean
     
    double
    getCorrelation(String fieldX, String fieldY)
    get the correlation between the two fields
    double
    getCovariance(String fieldX, String fieldY)
    get the covariance between the two fields
    long
    get the number of documents
    long
    get the number of samples for the given field.
    double
    get the distribution shape for the given field
    double
    getMean(String field)
    get the mean for the given field
     
    double
    get the distribution skewness for the given field
    double
    get the variance for the given field
     
    int
     
    protected boolean
     
    org.elasticsearch.search.aggregations.InternalAggregation
    reduce(List<org.elasticsearch.search.aggregations.InternalAggregation> aggregations, org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext reduceContext)
     

    Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation

    copyWithRewritenBuckets, forEachBucket, getMetadata, getName, getProperty, getType, isMapped, mergePipelineTreeForBWCSerialization, pipelineAggregatorsForBwcSerialization, readSize, reducePipelines, sortValue, sortValue, toString, toXContent, writeSize, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.elasticsearch.search.aggregations.Aggregation

    getMetadata, getName, getType

    Methods inherited from interface org.elasticsearch.xcontent.ToXContent

    toXContent

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment

    isFragment
  • Constructor Details

    • InternalMatrixStats

      public InternalMatrixStats(org.elasticsearch.common.io.stream.StreamInput in) throws IOException
      Read from a stream.
      Throws:
      IOException
  • Method Details

    • doWriteTo

      protected void doWriteTo(org.elasticsearch.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      doWriteTo in class org.elasticsearch.search.aggregations.InternalAggregation
      Throws:
      IOException
    • getWriteableName

      public String getWriteableName()
      Specified by:
      getWriteableName in interface org.elasticsearch.common.io.stream.NamedWriteable
    • getDocCount

      public long getDocCount()
      get the number of documents
      Specified by:
      getDocCount in interface MatrixStats
    • getFieldCount

      public long getFieldCount(String field)
      get the number of samples for the given field. == docCount - numMissing
      Specified by:
      getFieldCount in interface MatrixStats
    • getMean

      public double getMean(String field)
      get the mean for the given field
      Specified by:
      getMean in interface MatrixStats
    • getVariance

      public double getVariance(String field)
      get the variance for the given field
      Specified by:
      getVariance in interface MatrixStats
    • getSkewness

      public double getSkewness(String field)
      get the distribution skewness for the given field
      Specified by:
      getSkewness in interface MatrixStats
    • getKurtosis

      public double getKurtosis(String field)
      get the distribution shape for the given field
      Specified by:
      getKurtosis in interface MatrixStats
    • getCovariance

      public double getCovariance(String fieldX, String fieldY)
      get the covariance between the two fields
      Specified by:
      getCovariance in interface MatrixStats
    • getCorrelation

      public double getCorrelation(String fieldX, String fieldY)
      get the correlation between the two fields
      Specified by:
      getCorrelation in interface MatrixStats
    • doXContentBody

      public org.elasticsearch.xcontent.XContentBuilder doXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      doXContentBody in class org.elasticsearch.search.aggregations.InternalAggregation
      Throws:
      IOException
    • getProperty

      public Object getProperty(List<String> path)
      Specified by:
      getProperty in class org.elasticsearch.search.aggregations.InternalAggregation
    • reduce

      public org.elasticsearch.search.aggregations.InternalAggregation reduce(List<org.elasticsearch.search.aggregations.InternalAggregation> aggregations, org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext reduceContext)
      Specified by:
      reduce in class org.elasticsearch.search.aggregations.InternalAggregation
    • mustReduceOnSingleInternalAgg

      protected boolean mustReduceOnSingleInternalAgg()
      Specified by:
      mustReduceOnSingleInternalAgg in class org.elasticsearch.search.aggregations.InternalAggregation
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.elasticsearch.search.aggregations.InternalAggregation
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class org.elasticsearch.search.aggregations.InternalAggregation