java.lang.Object
org.opensearch.search.aggregations.matrix.stats.RunningStats
All Implemented Interfaces:
Cloneable, org.opensearch.core.common.io.stream.Writeable

public class RunningStats extends Object implements org.opensearch.core.common.io.stream.Writeable, Cloneable
Descriptive stats gathered per shard. Coordinating node computes final correlation and covariance stats based on these descriptive stats. This single pass, parallel approach is based on: http://prod.sandia.gov/techlib/access-control.cgi/2008/086212.pdf
  • Nested Class Summary

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

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

    Fields
    Modifier and Type
    Field
    Description
    protected HashMap<String,Long>
    counts
    covariance values
    protected long
    count of observations (same number of observations per field)
    protected HashMap<String,Double>
    per field sum of observations
    protected HashMap<String,Double>
    kurtosis values (fourth moment)
    protected HashMap<String,Double>
    mean values (first moment)
    protected HashMap<String,Double>
    skewness values (third moment)
    protected HashMap<String,Double>
    variance values (second moment)
  • Constructor Summary

    Constructors
    Constructor
    Description
    RunningStats(org.opensearch.core.common.io.stream.StreamInput in)
    Ctor to create an instance of running statistics
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(String[] fieldNames, double[] fieldVals)
    updates running statistics with a documents field values
     
    boolean
     
    int
     
    void
    Merges the descriptive statistics of a second data set (e.g., per shard) running computations taken from: http://prod.sandia.gov/techlib/access-control.cgi/2008/086212.pdf
    void
    writeTo(org.opensearch.core.common.io.stream.StreamOutput out)
     

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • RunningStats

      public RunningStats(org.opensearch.core.common.io.stream.StreamInput in) throws IOException
      Ctor to create an instance of running statistics
      Throws:
      IOException
  • Method Details

    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Throws:
      IOException
    • add

      public void add(String[] fieldNames, double[] fieldVals)
      updates running statistics with a documents field values
    • merge

      public void merge(RunningStats other)
      Merges the descriptive statistics of a second data set (e.g., per shard) running computations taken from: http://prod.sandia.gov/techlib/access-control.cgi/2008/086212.pdf
    • clone

      public RunningStats clone()
      Overrides:
      clone in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object