public class Statistics extends Object
Constructor and Description |
---|
Statistics() |
Modifier and Type | Method and Description |
---|---|
static double |
mad(double[] values)
Computes the mad statistic, that is the median of all distances to the median of input
values.
|
static double |
max(double[] values)
Computes the maximum value of an array of doubles.
|
static float |
max(float[] values) |
static float |
max(float[][] values) |
static int |
max(int[][] values) |
static float |
max(List<Float> values) |
static int |
maxId(int[] values) |
static double |
mean(double[] values)
Computes the mean value of an array of doubles.
|
static float |
mean(float[] values) |
static double |
median(double[] values,
boolean interpolated)
Computes the median value of an array of doubles.
|
static double |
min(double[] values)
Computes the minimum value of an array of doubles.
|
static float |
min(float[] values) |
static float |
min(float[][] values) |
static int |
min(int[][] values) |
static float |
min(List<Float> values) |
static int |
minId(double[] values)
Returns the id where the minimal value stands.
|
static int |
minId(float[] values) |
static int |
minId(int[] values) |
static double[] |
quantile(double[] values,
double[] levels)
A convenient shortcut for:
quantile(values, levels, true);
|
static double[] |
quantile(double[] values,
double[] levels,
boolean interpolated)
Computes the quantiles of an array of doubles.
|
static double |
std(double[] values)
Computes the standard deviation of an array of doubles.
|
static double |
variance(double[] values)
Compute the variance of an array of doubles.
|
public static double mean(double[] values)
values
- public static float mean(float[] values)
public static double min(double[] values)
values
- public static float min(float[] values)
public static float min(float[][] values)
public static int min(int[][] values)
public static int minId(double[] values)
public static int minId(float[] values)
public static int minId(int[] values)
public static double max(double[] values)
values
- public static float max(float[] values)
public static float max(float[][] values)
public static int max(int[][] values)
public static int maxId(int[] values)
public static double mad(double[] values)
values
- public static double std(double[] values)
values
- public static double variance(double[] values)
variance
normalizes the
output by N-1 if N>1, where N is the sample size.
This is an unbiased estimator of the variance of the population
For N=1, the output is 0.values
- public static double[] quantile(double[] values, double[] levels, boolean interpolated)
values
- levels
- a list of levels that must belong to [0;100]interpolated
- computes an interpolation of quantile when required quantile is not an exact vector id.an
- IllegalArgumentException if a level is out of the [0;100] bounds.public static double[] quantile(double[] values, double[] levels)
values
- levels
- public static double median(double[] values, boolean interpolated)
values
- interpolated
- Copyright © 2016. All rights reserved.