public class StatsUtil extends Object
| 构造器 | 说明 |
|---|---|
StatsUtil() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static double[] |
chiSquareTest(ucar.ma2.Array o) |
Chi-square test of independence
|
static double[] |
chiSquareTest(ucar.ma2.Array e,
ucar.ma2.Array o) |
Chi-square test
|
static Object |
cov(ucar.ma2.Array a,
boolean bias) |
Computes covariances for columns of a matrix.
|
static ucar.ma2.Array |
cov(ucar.ma2.Array x,
ucar.ma2.Array y,
boolean bias) |
Computes covariances for pairs of arrays or columns of a matrix.
|
static double |
covariance(ucar.ma2.Array x,
ucar.ma2.Array y,
boolean bias) |
Computes covariance of two arrays.
|
static double |
kendalltau(ucar.ma2.Array x,
ucar.ma2.Array y) |
Calculates Kendall's tau, a correlation measure for ordinal data.
|
static ucar.ma2.Array[] |
multipleLineRegress_OLS(ucar.ma2.Array y,
ucar.ma2.Array x) |
Implements ordinary least squares (OLS) to estimate the parameters of a
multiple linear regression model.
|
static ucar.ma2.Array[] |
multipleLineRegress_OLS(ucar.ma2.Array y,
ucar.ma2.Array x,
boolean noIntercept) |
Implements ordinary least squares (OLS) to estimate the parameters of a
multiple linear regression model.
|
static double[] |
pairedTTest(ucar.ma2.Array a,
ucar.ma2.Array b) |
Paired test evaluating the null hypothesis that the mean difference
between corresponding (paired) elements of the double[] arrays sample1
and sample2 is zero.
|
static double[] |
pearsonr(ucar.ma2.Array x,
ucar.ma2.Array y) |
Calculates a Pearson correlation coefficient.
|
static ucar.ma2.Array[] |
pearsonr(ucar.ma2.Array x,
ucar.ma2.Array y,
int axis) |
Calculates a Pearson correlation coefficient.
|
static double |
percentile(ucar.ma2.Array a,
double p) |
Returns an estimate of the pth percentile of the values in the array.
|
static ucar.ma2.Array |
percentile(ucar.ma2.Array a,
double p,
int axis) |
Returns an estimate of the pth percentile of the values in the array along an axis.
|
static Object |
spearmanr(ucar.ma2.Array a) |
Computes Spearman's rank correlation for columns of a matrix.
|
static ucar.ma2.Array |
spearmanr(ucar.ma2.Array x,
ucar.ma2.Array y) |
Computes Spearman's rank correlation for pairs of arrays or columns of a matrix.
|
static double[] |
tTest(ucar.ma2.Array a,
double mu) |
One sample t test
|
static double[] |
tTest(ucar.ma2.Array a,
ucar.ma2.Array b) |
unpaired, two-sided, two-sample t-test.
|
public static double covariance(ucar.ma2.Array x,
ucar.ma2.Array y,
boolean bias)
x - X datay - Y databias - If true, returned value will be bias-correctedpublic static ucar.ma2.Array cov(ucar.ma2.Array x,
ucar.ma2.Array y,
boolean bias)
x - X datay - Y databias - If true, returned value will be bias-correctedpublic static Object cov(ucar.ma2.Array a, boolean bias)
a - Matrix databias - If true, returned value will be bias-correctedpublic static double kendalltau(ucar.ma2.Array x,
ucar.ma2.Array y)
x - X datay - Y datapublic static double[] pearsonr(ucar.ma2.Array x,
ucar.ma2.Array y)
x - X datay - Y datapublic static ucar.ma2.Array[] pearsonr(ucar.ma2.Array x,
ucar.ma2.Array y,
int axis)
throws ucar.ma2.InvalidRangeException
x - X datay - Y dataaxis - Special axis for calculationucar.ma2.InvalidRangeExceptionpublic static ucar.ma2.Array spearmanr(ucar.ma2.Array x,
ucar.ma2.Array y)
x - X datay - Y datapublic static Object spearmanr(ucar.ma2.Array a)
a - Matrix datapublic static ucar.ma2.Array[] multipleLineRegress_OLS(ucar.ma2.Array y,
ucar.ma2.Array x)
y - Y sample data - one dimension arrayx - X sample data - two dimension arraypublic static ucar.ma2.Array[] multipleLineRegress_OLS(ucar.ma2.Array y,
ucar.ma2.Array x,
boolean noIntercept)
y - Y sample data - one dimension arrayx - X sample data - two dimension arraynoIntercept - No interceptpublic static double percentile(ucar.ma2.Array a,
double p)
a - Input arrayp - The percentile value to computepublic static ucar.ma2.Array percentile(ucar.ma2.Array a,
double p,
int axis)
throws ucar.ma2.InvalidRangeException
a - Input arrayp - The percentile value to computeaxis - The axisucar.ma2.InvalidRangeExceptionpublic static double[] tTest(ucar.ma2.Array a,
double mu)
a - Input datamu - Expected value in null hypothesispublic static double[] tTest(ucar.ma2.Array a,
ucar.ma2.Array b)
a - Sample a.b - Sample b.public static double[] pairedTTest(ucar.ma2.Array a,
ucar.ma2.Array b)
a - Sample a.b - Sample b.public static double[] chiSquareTest(ucar.ma2.Array e,
ucar.ma2.Array o)
e - Expected.o - Observed.public static double[] chiSquareTest(ucar.ma2.Array o)
o - Observed.Copyright © 2019. All rights reserved.