$darkmode
DENOPTIM
|
Utilities for calculating basic statistics. More...
Static Public Member Functions | |
static double | sum (double[] numbers) |
Returns the sum number in the numbers list. More... | |
static double | mean (double[] numbers) |
Returns the mean number in the numbers list. More... | |
static double | min (double[] numbers) |
Returns the minimum value among the numbers . More... | |
static double | max (double[] numbers) |
Returns the maximum value among the numbers . More... | |
static double | stddev (double[] numbers, boolean biasCorrected) |
Returns the standard deviation of the numbers. More... | |
static double | var (double[] numbers, boolean biasCorrected) |
Computes the variance of the available values. More... | |
static double | median (double[] m) |
Calculates median value of a sorted list. More... | |
static double | kurtosis (double[] m, boolean biasCorrected) |
Computes the Kurtosis of the available values. More... | |
static double | skewness (double[] m, boolean biasCorrected) |
Computes the skewness of the available values. More... | |
Utilities for calculating basic statistics.
Definition at line 25 of file StatUtils.java.
|
static |
Computes the Kurtosis of the available values.
We use the following (unbiased) formula to define kurtosis:
kurtosis = { [n(n+1) / (n -1)(n - 2)(n-3)] sum[(x_i - mean)^4] / std^4 } - [3(n-1)^2 / (n-2)(n-3)]
where n is the number of values, mean is the Mean
and std is the StandardDeviation
Note that this statistic is undefined for n < 4. Double.Nan
is returned when there is not sufficient data to compute the statistic.
Definition at line 205 of file StatUtils.java.
References denoptim.utils.StatUtils.mean(), and denoptim.utils.StatUtils.var().
|
static |
Returns the maximum value among the numbers .
numbers | list/array of numbers to calculate the max of. |
Definition at line 85 of file StatUtils.java.
References denoptim.utils.StatUtils.max().
Referenced by denoptim.ga.EAUtils.getSummaryStatistics(), and denoptim.utils.StatUtils.max().
|
static |
Returns the mean number in the numbers list.
numbers | list/array of numbers to calculate the mean of. |
Definition at line 53 of file StatUtils.java.
References denoptim.utils.StatUtils.sum().
Referenced by denoptim.ga.EAUtils.getSummaryStatistics(), denoptim.utils.StatUtils.kurtosis(), denoptim.utils.StatUtils.skewness(), and denoptim.utils.StatUtils.var().
|
static |
Calculates median value of a sorted list.
m |
Definition at line 172 of file StatUtils.java.
Referenced by denoptim.ga.EAUtils.getSummaryStatistics().
|
static |
Returns the minimum value among the numbers .
numbers | list/array of numbers to calculate the mean of. |
Definition at line 67 of file StatUtils.java.
References denoptim.utils.StatUtils.min().
Referenced by denoptim.ga.EAUtils.getSummaryStatistics(), and denoptim.utils.StatUtils.min().
|
static |
Computes the skewness of the available values.
m | sample |
biasCorrected | biasCorrected true if variance is calculated by dividing by n - 1. False if by n. stddev is a sqrt of the variance. |
Definition at line 246 of file StatUtils.java.
References denoptim.utils.StatUtils.mean(), and denoptim.utils.StatUtils.stddev().
Referenced by denoptim.ga.EAUtils.getSummaryStatistics().
|
static |
Returns the standard deviation of the numbers.
Double.NaN is returned if the numbers list is empty.
numbers | the numbers to calculate the standard deviation. |
biasCorrected | true if variance is calculated by dividing by n - 1. False if by n. stddev is a sqrt of the variance. |
Definition at line 107 of file StatUtils.java.
References denoptim.utils.StatUtils.stddev(), and denoptim.utils.StatUtils.var().
Referenced by denoptim.ga.EAUtils.getPopulationSD(), denoptim.ga.EAUtils.getSummaryStatistics(), denoptim.utils.StatUtils.skewness(), and denoptim.utils.StatUtils.stddev().
|
static |
Returns the sum number in the numbers list.
numbers | list/array of numbers to calculate the sum of. |
Definition at line 36 of file StatUtils.java.
References denoptim.utils.StatUtils.sum().
Referenced by denoptim.utils.StatUtils.mean(), denoptim.utils.StatUtils.sum(), and denoptim.utils.StatUtils.var().
|
static |
Computes the variance of the available values.
By default, the unbiased "sample variance" definitional formula is used: variance = sum((x_i - mean)^2) / (n - 1)
The "population variance" ( sum((x_i - mean)^2) / n ) can also be computed using this statistic. The biasCorrected
property determines whether the "population" or "sample" value is returned by the evaluate
and getResult
methods. To compute population variances, set this property to false
.
numbers | the numbers to calculate the variance. |
biasCorrected | true if variance is calculated by dividing by n - 1. False if by n. |
Definition at line 145 of file StatUtils.java.
References denoptim.utils.StatUtils.mean(), and denoptim.utils.StatUtils.sum().
Referenced by denoptim.utils.StatUtils.kurtosis(), and denoptim.utils.StatUtils.stddev().