|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.stat.DescriptiveStatistics
DescriptiveStatistics implements the Univariate interface but maintains the set of values which contribute to the values being returned. This implementation of Univariate provides additional percentile functionality such as. This additional functionality comes with a price of increased storage costs.
Field Summary | |
static int |
INFINITE_WINDOW
This constant signals that a Univariate implementation takes into account the contributions of an infinite number of elements. |
static int |
LEPTOKURTIC
A LEPTOKURTIC set has a positive kurtosis (a high peak) |
static int |
MESOKURTIC
A MESOKURTIC set has a kurtosis of 0 - it is a normal distribution |
static int |
PLATYKURTIC
A PLATYKURTIC set has a negative kurtosis (a flat "peak") |
Constructor Summary | |
DescriptiveStatistics()
|
Method Summary | |
abstract void |
addValue(double v)
Adds the value to the set of numbers |
abstract void |
clear()
Resets all statistics and storage |
abstract double |
getElement(int index)
Returns the element at the specified index |
abstract double |
getGeometricMean()
Returns the geometric mean of the available values |
abstract double |
getKurtosis()
Returns the Kurtosis of the available values. |
abstract int |
getKurtosisClass()
Returns the Kurtosis "classification" a distribution can be leptokurtic (high peak), platykurtic (flat peak), or mesokurtic (zero kurtosis). |
abstract double |
getMax()
Returns the maximum of the available values |
abstract double |
getMean()
Returns the arithmetic mean of the available values |
abstract double |
getMin()
Returns the minimum of the available values |
abstract int |
getN()
Returns the number of available values |
abstract double |
getPercentile(double p)
Returns an estimate for the pth percentile of the stored values. |
abstract double |
getSkewness()
Returns the skewness of the available values. |
abstract double[] |
getSortedValues()
Returns the current set of values in an array of double primitives, sorted in ascending order. |
abstract double |
getStandardDeviation()
Returns the standard deviation of the available values. |
abstract double |
getSum()
Returns the sum of the values that have been added to Univariate. |
abstract double |
getSumsq()
Returns the sum of the squares of the available values. |
abstract double[] |
getValues()
Returns the current set of values in an array of double primitives. |
abstract double |
getVariance()
Returns the variance of the available values. |
abstract int |
getWindowSize()
Univariate has the ability to return only measures for the last N elements added to the set of values. |
static DescriptiveStatistics |
newInstance()
Create an instance of a DescriptiveStatistics |
static DescriptiveStatistics |
newInstance(Class cls)
Create an instance of a DescriptiveStatistics |
static DescriptiveStatistics |
newInstance(String cls)
Create an instance of a DescriptiveStatistics |
abstract void |
setWindowSize(int windowSize)
WindowSize controls the number of values which contribute to the values returned by Univariate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int INFINITE_WINDOW
public static int LEPTOKURTIC
public static int MESOKURTIC
public static int PLATYKURTIC
Constructor Detail |
public DescriptiveStatistics()
Method Detail |
public static DescriptiveStatistics newInstance(String cls) throws InstantiationException, IllegalAccessException, ClassNotFoundException
DescriptiveStatistics
InstantiationException
IllegalAccessException
ClassNotFoundException
public static DescriptiveStatistics newInstance(Class cls) throws InstantiationException, IllegalAccessException
DescriptiveStatistics
InstantiationException
IllegalAccessException
public static DescriptiveStatistics newInstance()
DescriptiveStatistics
public abstract void addValue(double v)
v
- the value to be addedpublic abstract double getMean()
public abstract double getGeometricMean()
public abstract double getVariance()
public abstract double getStandardDeviation()
public abstract double getSkewness()
public abstract double getKurtosis()
public abstract int getKurtosisClass()
public abstract double getMax()
public abstract double getMin()
public abstract int getN()
public abstract double getSum()
public abstract double getSumsq()
public abstract void clear()
public abstract int getWindowSize()
public abstract void setWindowSize(int windowSize)
windowSize
- sets the size of the window.public abstract double[] getValues()
public abstract double[] getSortedValues()
public abstract double getElement(int index)
index
- The Index of the element
public abstract double getPercentile(double p)
0 < p < 100
(otherwise an
IllegalArgumentException
is thrown)Double.NaN
otherwise)
p
- the requested percentile (scaled from 0 - 100)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |