org.jquantlib.math.statistics
Class GeneralStatistics
- java.lang.Object
-
- org.jquantlib.math.statistics.GeneralStatistics
-
- Direct Known Subclasses:
- GenericGaussianStatistics
public abstract class GeneralStatistics extends java.lang.ObjectStatistics toolThis class accumulates a set of data and returns their statistics (e.g: mean, variance, skewness, kurtosis, error estimation, percentile, etc.) based on the empirical distribution (no gaussian assumption)
It doesn't suffer the numerical instability problem of IncrementalStatistics. The downside is that it stores all samples, thus increasing the memory requirements.
-
-
Constructor Summary
Constructors Constructor and Description GeneralStatistics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(double value)voidadd(double value, double weight)voidaddSequence(Array datum)adds a sequence of data to the set, with default weightvoidaddSequence(Array datum, Array weights)adds a sequence of data to the set, each with its weightvoidaddSequence(double[] datum)adds a sequence of data to the set, with default weightvoidaddSequence(double[] datum, double[] weights)adds a sequence of data to the set, each with its weightjava.util.List<ComparablePair<java.lang.Double,java.lang.Double>>data()doubleerrorEstimate()Pair<java.lang.Double,java.lang.Integer>expectationValue(Ops.DoubleOp f, Ops.DoublePredicate inRange)doublekurtosis()doublemax()doublemean()doublemin()doublepercentile(double percent)voidreset()resets the data to a null setintsamples()doubleskewness()voidsort()sort the data set in increasing orderdoublestandardDeviation()doubletopPercentile(double percent)doublevariance()doubleweightSum()
-
-
-
Method Detail
-
addSequence
public void addSequence(double[] datum)
adds a sequence of data to the set, with default weight
-
addSequence
public void addSequence(double[] datum, double[] weights)adds a sequence of data to the set, each with its weight
-
addSequence
public void addSequence(Array datum)
adds a sequence of data to the set, with default weight
-
addSequence
public void addSequence(Array datum, Array weights)
adds a sequence of data to the set, each with its weight
-
reset
public void reset()
resets the data to a null set
-
sort
public void sort()
sort the data set in increasing order
-
samples
public int samples()
-
data
public java.util.List<ComparablePair<java.lang.Double,java.lang.Double>> data()
-
weightSum
public double weightSum()
-
mean
public double mean()
-
variance
public double variance()
-
standardDeviation
public double standardDeviation()
-
errorEstimate
public double errorEstimate()
-
skewness
public double skewness()
-
kurtosis
public double kurtosis()
-
min
public double min()
-
max
public double max()
-
expectationValue
public final Pair<java.lang.Double,java.lang.Integer> expectationValue(Ops.DoubleOp f, Ops.DoublePredicate inRange)
-
percentile
public double percentile(double percent)
-
topPercentile
public double topPercentile(double percent)
-
add
public void add(double value)
-
add
public void add(double value, double weight)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG