Package elki.math.statistics.dependence
Class PearsonCorrelationDependence
- java.lang.Object
-
- elki.math.statistics.dependence.PearsonCorrelationDependence
-
- All Implemented Interfaces:
Dependence
@Priority(201) public class PearsonCorrelationDependence extends java.lang.Object implements Dependence
Pearson product-moment correlation coefficient.- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PearsonCorrelationDependence.Par
Parameterization class-
Nested classes/interfaces inherited from interface elki.math.statistics.dependence.Dependence
Dependence.Utils
-
-
Field Summary
Fields Modifier and Type Field Description private static Logging
LOG
Class logger.static PearsonCorrelationDependence
STATIC
Static instance.
-
Constructor Summary
Constructors Modifier Constructor Description protected
PearsonCorrelationDependence()
Constructor - useSTATIC
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A,B>
doubledependence(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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.math.statistics.dependence.Dependence
dependence, dependence
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Class logger.
-
STATIC
public static final PearsonCorrelationDependence STATIC
Static instance.
-
-
Constructor Detail
-
PearsonCorrelationDependence
protected PearsonCorrelationDependence()
Constructor - useSTATIC
instance.
-
-
Method Detail
-
dependence
public <A,B> double dependence(NumberArrayAdapter<?,A> adapter1, A data1, NumberArrayAdapter<?,B> adapter2, B data2)
Description copied from interface:Dependence
Measure the dependence of two variables.This is the more flexible API, which allows using different internal data representations.
- Specified by:
dependence
in interfaceDependence
- Type Parameters:
A
- First array typeB
- Second array type- Parameters:
adapter1
- First data adapterdata1
- First data setadapter2
- Second data adapterdata2
- Second data set- Returns:
- Dependence measure
-
dependence
public <A> double[] dependence(NumberArrayAdapter<?,A> adapter, java.util.List<? extends A> data)
Description copied from interface:Dependence
Measure the dependence of two variables.This is the more flexible API, which allows using different internal data representations.
The resulting data is a serialized lower triangular matrix:
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
- Specified by:
dependence
in interfaceDependence
- Type Parameters:
A
- Array type- Parameters:
adapter
- Data adapterdata
- Data sets. Must have fast random access!- Returns:
- Lower triangular serialized matrix
-
-