Class InternalMatrixStats

  • All Implemented Interfaces:
    org.elasticsearch.common.io.stream.NamedWriteable, org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment, org.elasticsearch.search.aggregations.Aggregation, MatrixStats

    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 interface org.elasticsearch.search.aggregations.Aggregation

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

        org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext
      • Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

        org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
      • Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

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

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

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

        metaData, name
      • Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

        EMPTY_PARAMS
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean doEquals​(java.lang.Object obj)  
      protected int doHashCode()  
      org.elasticsearch.search.aggregations.InternalAggregation doReduce​(java.util.List<org.elasticsearch.search.aggregations.InternalAggregation> aggregations, org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext reduceContext)  
      protected void doWriteTo​(org.elasticsearch.common.io.stream.StreamOutput out)  
      org.elasticsearch.common.xcontent.XContentBuilder doXContentBody​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)  
      double getCorrelation​(java.lang.String fieldX, java.lang.String fieldY)
      get the correlation between the two fields
      double getCovariance​(java.lang.String fieldX, java.lang.String fieldY)
      get the covariance between the two fields
      long getDocCount()
      get the number of documents
      long getFieldCount​(java.lang.String field)
      get the number of samples for the given field.
      double getKurtosis​(java.lang.String field)
      get the distribution shape for the given field
      double getMean​(java.lang.String field)
      get the mean for the given field
      java.lang.Object getProperty​(java.util.List<java.lang.String> path)  
      double getSkewness​(java.lang.String field)
      get the distribution skewness for the given field
      double getVariance​(java.lang.String field)
      get the variance for the given field
      java.lang.String getWriteableName()  
      • Methods inherited from interface org.elasticsearch.search.aggregations.Aggregation

        getMetaData, getName, getType
      • Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation

        equals, getMetaData, getName, getProperty, getType, hashCode, isMapped, pipelineAggregators, readSize, reduce, 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.common.xcontent.ToXContent

        toXContent
      • Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment

        isFragment
    • Constructor Detail

      • InternalMatrixStats

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

      • doWriteTo

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

        public java.lang.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​(java.lang.String field)
        get the number of samples for the given field. == docCount - numMissing
        Specified by:
        getFieldCount in interface MatrixStats
      • getMean

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

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

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

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

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

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

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

        public java.lang.Object getProperty​(java.util.List<java.lang.String> path)
        Specified by:
        getProperty in class org.elasticsearch.search.aggregations.InternalAggregation
      • doReduce

        public org.elasticsearch.search.aggregations.InternalAggregation doReduce​(java.util.List<org.elasticsearch.search.aggregations.InternalAggregation> aggregations,
                                                                                  org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext reduceContext)
        Specified by:
        doReduce in class org.elasticsearch.search.aggregations.InternalAggregation
      • doHashCode

        protected int doHashCode()
        Specified by:
        doHashCode in class org.elasticsearch.search.aggregations.InternalAggregation
      • doEquals

        protected boolean doEquals​(java.lang.Object obj)
        Specified by:
        doEquals in class org.elasticsearch.search.aggregations.InternalAggregation