public abstract class AbstractDependenceMeasure extends Object implements DependenceMeasure
Constructor and Description |
---|
AbstractDependenceMeasure() |
Modifier and Type | Method and Description |
---|---|
protected static double |
clamp(double value,
double min,
double max)
Clamp values to a given minimum and maximum.
|
static <A> double[] |
computeNormalizedRanks(NumberArrayAdapter<?,A> adapter,
A data,
int len)
Compute ranks of all objects, normalized to [0;1] (where 0 is the smallest
value, 1 is the largest).
|
double |
dependence(double[] data1,
double[] data2)
Measure the dependence of two variables.
|
<A> double |
dependence(NumberArrayAdapter<?,A> adapter,
A data1,
A data2)
Measure the dependence of two variables.
|
abstract <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,
List<? extends A> data)
Measure the dependence of two variables.
|
static <A> int[] |
discretize(NumberArrayAdapter<?,A> adapter,
A data,
int len,
int bins)
Discretize a data set into equi-width bin numbers.
|
protected static int |
index(int x,
int y)
Index into the serialized array.
|
static <A> double[] |
ranks(NumberArrayAdapter<?,A> adapter,
A data,
int len)
Compute ranks of all objects, ranging from 1 to len.
|
static <A> double[] |
ranks(NumberArrayAdapter<?,A> adapter,
A data,
int[] idx)
Compute ranks of all objects, ranging from 1 to len.
|
static <A,B> int |
size(NumberArrayAdapter<?,A> adapter1,
A data1,
NumberArrayAdapter<?,B> adapter2,
B data2)
Validate the length of the two data sets (must be the same, and non-zero)
|
static <A> int |
size(NumberArrayAdapter<?,A> adapter,
Collection<? extends A> data)
Validate the length of the two data sets (must be the same, and non-zero)
|
static <A> int[] |
sortedIndex(NumberArrayAdapter<?,A> adapter,
A data,
int len)
Build a sorted index of objects.
|
public abstract <A,B> double dependence(NumberArrayAdapter<?,A> adapter1, A data1, NumberArrayAdapter<?,B> adapter2, B data2)
DependenceMeasure
dependence
in interface DependenceMeasure
A
- First array typeB
- Second array typeadapter1
- First data adapterdata1
- First data setadapter2
- Second data adapterdata2
- Second data setpublic double dependence(double[] data1, double[] data2)
DependenceMeasure
dependence
in interface DependenceMeasure
data1
- First data setdata2
- Second data setpublic <A> double dependence(NumberArrayAdapter<?,A> adapter, A data1, A data2)
DependenceMeasure
dependence
in interface DependenceMeasure
A
- Array typeadapter
- Array type adapterdata1
- First data setdata2
- Second data setpublic <A> double[] dependence(NumberArrayAdapter<?,A> adapter, 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
dependence
in interface DependenceMeasure
A
- Array typeadapter
- Data adapterdata
- Data sets. Must have fast random access!protected static double clamp(double value, double min, double max)
value
- True valuemin
- Minimummax
- Maximumvalue
, unless smaller than min
or larger than
max
.public static <A> double[] computeNormalizedRanks(NumberArrayAdapter<?,A> adapter, A data, int len)
adapter
- Data adapterdata
- Data arraylen
- Length of datapublic static <A> double[] ranks(NumberArrayAdapter<?,A> adapter, A data, int len)
adapter
- Data adapterdata
- Data arraylen
- Length of datapublic static <A> double[] ranks(NumberArrayAdapter<?,A> adapter, A data, int[] idx)
adapter
- Data adapterdata
- Data arrayidx
- Data indexpublic static <A> int[] sortedIndex(NumberArrayAdapter<?,A> adapter, A data, int len)
adapter
- Data adapterdata
- Data arraylen
- Length of datapublic static <A> int[] discretize(NumberArrayAdapter<?,A> adapter, A data, int len, int bins)
adapter
- Data adapterdata
- Data arraylen
- Length of databins
- Number of binsprotected static int index(int x, int y)
x
- Columny
- Rowpublic static <A,B> int size(NumberArrayAdapter<?,A> adapter1, A data1, NumberArrayAdapter<?,B> adapter2, B data2)
A
- First array typeB
- Second array typeadapter1
- First data adapterdata1
- First data setadapter2
- Second data adapterdata2
- Second data setpublic static <A> int size(NumberArrayAdapter<?,A> adapter, Collection<? extends A> data)
A
- First array typeadapter
- Data adapterdata
- Data setsCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.