public class SpearmanRankCorrelation extends Object implements Statistic
Constructor and Description |
---|
SpearmanRankCorrelation(double[] data1,
double[] data2)
Construct a Spearman rank calculator initialized with two samples.
|
Modifier and Type | Method and Description |
---|---|
void |
addData(double... data)
Update the statistic with more data.
|
void |
addData(double[] data1,
double[] data2)
Add the given two samples.
|
long |
N()
Get the size of the sample.
|
double |
value()
Get the value of the statistic.
|
public SpearmanRankCorrelation(double[] data1, double[] data2)
data1
- the first sampledata2
- the second samplepublic void addData(double... data)
double[]
, we concatenate the two arrays into one.
For example, suppose we want to do
addData(new double[][]{
{1, 2, 3},
{4, 5, 6}
});
We can also write
addData(new double[]{
{1, 2, 3, 4, 5, 6}
});
In the latter case, there must be an even number of data points.public void addData(double[] data1, double[] data2)
data1
- the first sampledata2
- the second samplepublic long N()
Statistic
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.