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.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
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashMap<java.lang.String,java.lang.Long>
counts
countsprotected java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>
covariances
covariance valuesprotected long
docCount
count of observations (same number of observations per field)protected java.util.HashMap<java.lang.String,java.lang.Double>
fieldSum
per field sum of observationsprotected java.util.HashMap<java.lang.String,java.lang.Double>
kurtosis
kurtosis values (fourth moment)protected java.util.HashMap<java.lang.String,java.lang.Double>
means
mean values (first moment)protected java.util.HashMap<java.lang.String,java.lang.Double>
skewness
skewness values (third moment)protected java.util.HashMap<java.lang.String,java.lang.Double>
variances
variance 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 void
add(java.lang.String[] fieldNames, double[] fieldVals)
updates running statistics with a documents field valuesRunningStats
clone()
boolean
equals(java.lang.Object o)
int
hashCode()
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.pdfvoid
writeTo(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:
writeTo
in 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:
clone
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-