|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaitools.numeric.SampleStats
public class SampleStats
A collection of static methods to calculate summary statistics for a sample of double-valued data. This class is used by both Jiffle and the KernelStats operator.
| Constructor Summary | |
|---|---|
SampleStats()
|
|
| Method Summary | |
|---|---|
static double |
max(Double[] values,
boolean ignoreNaN)
Return the maximum of the given values. |
static double |
mean(Double[] values,
boolean ignoreNaN)
Return the mean of the given values. |
static double |
median(Double[] values,
boolean ignoreNaN)
Calculates the median of the given values. |
static double |
min(Double[] values,
boolean ignoreNaN)
Calculates the minimum of the given values. |
static double |
mode(Double[] values,
boolean ignoreNaN)
Calculates the empirical mode (highest frequency value) of the given values. |
static double |
range(Double[] values,
boolean ignoreNaN)
Calculates the range (max - min) of a set of values. |
static double |
sdev(Double[] values,
boolean ignoreNaN)
Calculates sample standard deviation. |
static double |
sum(Double[] values,
boolean ignoreNaN)
Calculates the sum of the values. |
static double |
variance(Double[] values,
boolean ignoreNaN)
Calculates sample variance using the running sample algorithm of Welford (1962) described by Knuth in The Art of Computer Programming (3rd ed) Vol.2 p.232 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SampleStats()
| Method Detail |
|---|
public static double max(Double[] values,
boolean ignoreNaN)
values - sample valuesignoreNaN - specifies whether to ignore NaN values
public static double mean(Double[] values,
boolean ignoreNaN)
values - sample valuesignoreNaN - specifies whether to ignore NaN values
public static double min(Double[] values,
boolean ignoreNaN)
values - sample valuesignoreNaN - specifies whether to ignore NaN values
public static double median(Double[] values,
boolean ignoreNaN)
values - sample values (need not be pre-sorted)ignoreNaN - specifies whether to ignore NaN values
public static double mode(Double[] values,
boolean ignoreNaN)
values - sample valuesignoreNaN - specifies whether to ignore NaN values
public static double range(Double[] values,
boolean ignoreNaN)
values - sample valuesignoreNaN - specifies whether to ignore NaN values
public static double variance(Double[] values,
boolean ignoreNaN)
values - sample valuesignoreNaN - specifies whether to ignore NaN values
public static double sdev(Double[] values,
boolean ignoreNaN)
values - sample valuesignoreNaN - specifies whether to ignore NaN values
public static double sum(Double[] values,
boolean ignoreNaN)
values - sample valuesignoreNaN - specifies whether to ignore NaN values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||