@Reference(authors="G. J. Sz\u00e9kely, M. L. Rizzo, N. K. Bakirov", title="Measuring and testing dependence by correlation of distances", booktitle="The Annals of Statistics, 35(6), 2769-2794", url="https://doi.org/10.1214/009053607000000505", bibkey="doi:10.1214/009053607000000505") public class DistanceCorrelationDependenceMeasure extends AbstractDependenceMeasure
The value returned is the square root of the dCor² value. This matches the R implementation by the original authors.
Reference:
G. J. Székely, M. L. Rizzo, N. K. Bakirov
Measuring and testing dependence by correlation of distances
The Annals of Statistics, 35(6), 2769-2794
Implementation notice: we exploit symmetry, and thus use diagonal matrixes. While initially the diagonal is zero, after double-centering the matrix these values can become non-zero!
Modifier and Type | Class and Description |
---|---|
static class |
DistanceCorrelationDependenceMeasure.Parameterizer
Parameterization class
|
Modifier and Type | Field and Description |
---|---|
static DistanceCorrelationDependenceMeasure |
STATIC
Static instance.
|
Modifier | Constructor and Description |
---|---|
protected |
DistanceCorrelationDependenceMeasure()
Constructor - use
STATIC instance instead! |
Modifier and Type | Method and Description |
---|---|
protected double |
computeDCovar(double[] dVarMatrixA,
double[] dVarMatrixB,
int n)
Computes the distance covariance for two axis.
|
protected static <A> double[] |
computeDistances(NumberArrayAdapter<?,A> adapter,
A data)
Compute the double-centered delta matrix.
|
<A,B> double |
dependence(NumberArrayAdapter<?,A> adapter1,
A data1,
NumberArrayAdapter<?,B> adapter2,
B data2)
Measure the dependence of two variables.
|
<A> double[] |
dependence(NumberArrayAdapter<?,A> adapter,
java.util.List<? extends A> data)
Measure the dependence of two variables.
|
static void |
doubleCenterMatrix(double[] dMatrix,
int size)
Computes the distance variance matrix of one axis.
|
clamp, computeNormalizedRanks, discretize, index, ranks, ranks, size, size, sortedIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dependence, dependence
public static final DistanceCorrelationDependenceMeasure STATIC
protected DistanceCorrelationDependenceMeasure()
STATIC
instance instead!public <A,B> double dependence(NumberArrayAdapter<?,A> adapter1, A data1, NumberArrayAdapter<?,B> adapter2, B data2)
DependenceMeasure
A
- First array typeB
- Second array typeadapter1
- First data adapterdata1
- First data setadapter2
- Second data adapterdata2
- Second data setpublic <A> double[] dependence(NumberArrayAdapter<?,A> adapter, java.util.List<? extends A> data)
DependenceMeasure
X S S S S S 0 X S S S S 1 2 X S S S 3 4 5 X S S 6 7 8 9 X S 10 11 12 13 14 X
A
- Array typeadapter
- Data adapterdata
- Data sets. Must have fast random access!protected static <A> double[] computeDistances(NumberArrayAdapter<?,A> adapter, A data)
adapter
- Data adapterdata
- Input datapublic static void doubleCenterMatrix(double[] dMatrix, int size)
dMatrix
- distance matrix of the axissize
- Dimensionalityprotected double computeDCovar(double[] dVarMatrixA, double[] dVarMatrixB, int n)
dVarMatrixA
- distance variance matrix of the first axisdVarMatrixB
- distance variance matrix of the second axisn
- number of pointsCopyright © 2019 ELKI Development Team. License information.