Class RunningStats
- java.lang.Object
-
- org.elasticsearch.search.aggregations.matrix.stats.RunningStats
-
- All Implemented Interfaces:
java.lang.Cloneable,org.elasticsearch.common.io.stream.Writeable
public class RunningStats extends java.lang.Object implements org.elasticsearch.common.io.stream.Writeable, java.lang.CloneableDescriptive 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
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashMap<java.lang.String,java.lang.Long>countscountsprotected java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>covariancescovariance valuesprotected longdocCountcount of observations (same number of observations per field)protected java.util.HashMap<java.lang.String,java.lang.Double>fieldSumper field sum of observationsprotected java.util.HashMap<java.lang.String,java.lang.Double>kurtosiskurtosis values (fourth moment)protected java.util.HashMap<java.lang.String,java.lang.Double>meansmean values (first moment)protected java.util.HashMap<java.lang.String,java.lang.Double>skewnessskewness values (third moment)protected java.util.HashMap<java.lang.String,java.lang.Double>variancesvariance values (second moment)
-
Constructor Summary
Constructors Constructor Description RunningStats(org.elasticsearch.common.io.stream.StreamInput in)Ctor to create an instance of running statistics
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.String[] fieldNames, double[] fieldVals)updates running statistics with a documents field valuesRunningStatsclone()booleanequals(java.lang.Object o)inthashCode()voidmerge(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.pdfvoidwriteTo(org.elasticsearch.common.io.stream.StreamOutput out)
-
-
-
Field Detail
-
docCount
protected long docCount
count of observations (same number of observations per field)
-
fieldSum
protected java.util.HashMap<java.lang.String,java.lang.Double> fieldSum
per field sum of observations
-
counts
protected java.util.HashMap<java.lang.String,java.lang.Long> counts
counts
-
means
protected java.util.HashMap<java.lang.String,java.lang.Double> means
mean values (first moment)
-
variances
protected java.util.HashMap<java.lang.String,java.lang.Double> variances
variance values (second moment)
-
skewness
protected java.util.HashMap<java.lang.String,java.lang.Double> skewness
skewness values (third moment)
-
kurtosis
protected java.util.HashMap<java.lang.String,java.lang.Double> kurtosis
kurtosis values (fourth moment)
-
covariances
protected java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>> covariances
covariance values
-
-
Method Detail
-
writeTo
public void writeTo(org.elasticsearch.common.io.stream.StreamOutput out) throws java.io.IOException- Specified by:
writeToin interfaceorg.elasticsearch.common.io.stream.Writeable- Throws:
java.io.IOException
-
add
public void add(java.lang.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:
clonein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-