@Reference(authors="Erich Schubert, Michael Gertz",title="Numerically Stable Parallel Computation of (Co-)Variance",booktitle="Proc. 30th Int. Conf. Scientific and Statistical Database Management (SSDBM 2018)",url="https://doi.org/10.1145/3221269.3223036",bibkey="DBLP:conf/ssdbm/SchubertG18") @Reference(authors="T. B. Terriberry",title="Computing Higher-Order Moments Online",booktitle="",url="http://people.xiph.org/~tterribe/notes/homs.html",bibkey="web/Terriberry07") @Reference(authors="P. P\u00e9bay",title="Formulas for Robust, One-Pass Parallel Computation of Covariances and Arbitrary-Order Statistical Moments",booktitle="Sandia Report SAND2008-6212, Sandia National Laboratories",url="https://prod.sandia.gov/techlib-noauth/access-control.cgi/2008/086212.pdf",bibkey="tr/sandia/Pebay08") @Reference(authors="E. A. Youngs, E. M. Cramer",title="Some Results Relevant to Choice of Sum and Sum-of-Product Algorithms",booktitle="Technometrics 13(3)",url="https://doi.org/10.1080/00401706.1971.10488826",bibkey="doi:10.1080/00401706.1971.10488826") public class StatisticalMoments extends MeanVarianceMinMax
References:
An exhaustive performance study:
Erich Schubert, Michael Gertz
Numerically Stable Parallel Computation of (Co-)Variance
Proc. 30th Int. Conf. Scientific and Statistical Database Management
(SSDBM 2018)
Details on higher order moments:
T. B. Terriberry
Computing Higher-Order Moments Online
http://people.xiph.org/~tterribe/notes/homs.html
General recurrence, for higher order moments, can be found in:
P. Pébay
Formulas for Robust, One-Pass Parallel Computation of Covariances and
Arbitrary-Order Statistical Moments
Sandia Report SAND2008-6212, Sandia National Laboratories
But our approach also uses parts of
E. A. Youngs and E. M. Cramer
Some Results Relevant to Choice of Sum and Sum-of-Product Algorithms
Technometrics 13(3), 1971
Modifier and Type | Field and Description |
---|---|
(package private) double |
m3
Third moment.
|
(package private) double |
m4
Fourth moment.
|
max, min
m2
Constructor and Description |
---|
StatisticalMoments()
Empty constructor
|
StatisticalMoments(StatisticalMoments other)
Constructor from other instance
|
Modifier and Type | Method and Description |
---|---|
double |
getNaiveExcessKurtosis()
Get the kurtosis using naive variance.
|
double |
getNaiveKurtosis()
Get the kurtosis using naive variance.
|
double |
getNaiveSkewness()
Get the skewness using naive variance.
|
double |
getSampleExcessKurtosis()
Get the kurtosis using sample variance.
|
double |
getSampleKurtosis()
Get the kurtosis using sample variance.
|
double |
getSampleSkewness()
Get the skewness using sample variance.
|
static StatisticalMoments[] |
newArray(int dimensionality)
Create and initialize a new array of MeanVariance
|
void |
put(double val)
Add a single value with weight 1.0
|
StatisticalMoments |
put(double[] vals)
Add values with weight 1.0
|
StatisticalMoments |
put(double[] vals,
double[] weights)
Add values with weight 1.0
|
void |
put(double val,
double weight)
Add data with a given weight.
|
void |
put(Mean other)
Join the data of another MeanVariance instance.
|
void |
reset()
Reset the value.
|
java.lang.String |
toString() |
getDiff, getDoubleMinMax, getMax, getMin
getNaiveStddev, getNaiveVariance, getSampleStddev, getSampleVariance, getSumOfSquares
getCount, getMean, highPrecision, of
public StatisticalMoments()
public StatisticalMoments(StatisticalMoments other)
other
- other instance to copy data from.public void put(double val)
put
in class MeanVarianceMinMax
val
- Valuepublic void put(double val, double weight)
put
in class MeanVarianceMinMax
val
- dataweight
- weightpublic void put(Mean other)
put
in class MeanVarianceMinMax
other
- Data to join withpublic StatisticalMoments put(double[] vals)
MeanVarianceMinMax
put
in class MeanVarianceMinMax
vals
- Valuespublic StatisticalMoments put(double[] vals, double[] weights)
Mean
put
in class MeanVarianceMinMax
vals
- Valuespublic double getSampleSkewness()
public double getNaiveSkewness()
public double getSampleKurtosis()
public double getNaiveKurtosis()
public double getSampleExcessKurtosis()
public double getNaiveExcessKurtosis()
public static StatisticalMoments[] newArray(int dimensionality)
dimensionality
- Dimensionalitypublic java.lang.String toString()
toString
in class MeanVarianceMinMax
public void reset()
Mean
reset
in class MeanVarianceMinMax
Copyright © 2019 ELKI Development Team. License information.