public class ColumnStats
extends java.lang.Object
Sum
Mean
Variance
Standard deviation
Skew
Kurtosis
Minimum
Maximum
Median
Upper and Lower percentiles
Number of valid (non-NaN) values
Geometric mean
NaNs are treated as missing values and discounted from all calculations.
An internal matrix contains the following parameters in the rows specified by ColumnStats.X where X is a static final int.ColumnStats.SUM the sum of values.
ColumnStats.SUMDELTA2 the sum of squares of residuals.
ColumnStats.SUMDELTA3 the sum of cubes of residuals.
ColumnStats.SUMDELTA4 the sum of residuals to power 4.
ColumnStats.MIN minimum value.
ColumnStats.MAX maximum value.
ColumnStats.MEDIAN median value.
ColumnStats.LOWER lower percent.
ColumnStats.UPPER upper percent.
ColumnStats.SUMLOG sum of logs.
ColumnStats.N number of observations (discounting NaNs).
ColumnStats.Pct the requested percent (0 to 50):
LOWER contains these values while UPPER contains values for percent = (100-ColumnStats.Pct).
Modifier and Type | Field and Description |
---|---|
static int |
LOWER |
static int |
MAX |
static int |
MEDIAN |
static int |
MIN |
static int |
N |
static int |
SUM |
static int |
SUMDELTA2 |
static int |
SUMDELTA3 |
static int |
SUMDELTA4 |
static int |
SUMLOG |
static int |
UPPER |
Constructor and Description |
---|
ColumnStats(double[][] data)
Returns statistics using 25th/75th percentiles
|
ColumnStats(double[][] data,
int percentile)
Returns statistics using specified percentiles
|
Modifier and Type | Method and Description |
---|---|
int |
getDimension()
Returns the number of columns for the input array.
|
double[][] |
getGeometricMean()
Returns the geometric mean for each column of the data.
|
double[][] |
getKurtosis()
Returns the kurtosis of the data in each column of the input.
|
double[][] |
getLower()
Returns the lower pecentile for each column of the data.
|
double[][] |
getMaximum()
Returns the maximum value for each column of the data.
|
double[][] |
getMean()
Returns the mean of the data in each column of the input.
|
double[][] |
getMedian()
Returns the median value for each column of the data.
|
double[][] |
getMinimum()
Returns the minimum value for each column of the data.
|
double[][] |
getN()
Returns the number of data points for each column of the data.
|
double |
getPercentile()
Returns the lower pecentile used.
|
double[][] |
getSD()
Returns the standard deviation of the data in each column of the input.
|
double[][] |
getSkew()
Returns the skew of the data in each column of the input.
|
double[][] |
getSum()
Returns the sum of the data in each column of the input.
|
double[][] |
getSummary()
Returns a copy of the intermediate array used in calculations.
|
double[][] |
getUpper()
Returns the upper pecentile for each column of the data.
|
double[][] |
getVariance()
Returns the variance of the data in each column of the input.
|
boolean |
isKurtosisCorrected()
Returns true if bias correction is to be applied to the kurtosis
|
boolean |
isSkewCorrected()
Returns true if bias correction is to be applied to the skew
|
boolean |
isVarianceCorrected()
Returns true if bias correction is to be applied to the variance
|
void |
setKurtosisCorrected(boolean flag)
Sets bias correction mode for the kurtosis
|
void |
setSkewCorrected(boolean flag)
Sets bias correction mode for the skew
|
void |
setVarianceCorrected(boolean flag)
Sets bias correction mode for the variance (and standard deviation)
|
java.lang.String |
toString() |
public static final int SUM
public static final int SUMDELTA2
public static final int SUMDELTA3
public static final int SUMDELTA4
public static final int MIN
public static final int MAX
public static final int MEDIAN
public static final int LOWER
public static final int UPPER
public static final int SUMLOG
public static final int N
public ColumnStats(double[][] data)
data
- the data to analyzepublic ColumnStats(double[][] data, int percentile)
data
- the data to analyzepercentile
- the percentiles to usepublic int getDimension()
public double[][] getSum()
public double[][] getMean()
public double[][] getVariance()
varianeCorrected
is true.public double[][] getSD()
varianceCorrected
is true.public double[][] getSkew()
skewCorrected
is true.public double[][] getKurtosis()
kurtosisCorrected
is
true.public double[][] getMinimum()
public double[][] getMaximum()
public double[][] getGeometricMean()
public double[][] getN()
public double[][] getMedian()
public double[][] getLower()
public double[][] getUpper()
public double getPercentile()
public double[][] getSummary()
public boolean isVarianceCorrected()
public void setVarianceCorrected(boolean flag)
flag
- public boolean isSkewCorrected()
public void setSkewCorrected(boolean flag)
flag
- public boolean isKurtosisCorrected()
public void setKurtosisCorrected(boolean flag)
flag
- public java.lang.String toString()
toString
in class java.lang.Object