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