Package elki.math.statistics.dependence
Class Dependence.Utils
- java.lang.Object
-
- elki.math.statistics.dependence.Dependence.Utils
-
- Enclosing interface:
- Dependence
public static class Dependence.Utils extends java.lang.Object
Utility functions that were previously in the abstract class.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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).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>
intsize(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, java.util.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.
-
-
-
Method Detail
-
computeNormalizedRanks
public 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).- Parameters:
adapter
- Data adapterdata
- Data arraylen
- Length of data- Returns:
- Array of scores
-
ranks
public static <A> double[] ranks(NumberArrayAdapter<?,A> adapter, A data, int len)
Compute ranks of all objects, ranging from 1 to len.Ties are given the average rank.
- Parameters:
adapter
- Data adapterdata
- Data arraylen
- Length of data- Returns:
- Array of scores
-
ranks
public static <A> double[] ranks(NumberArrayAdapter<?,A> adapter, A data, int[] idx)
Compute ranks of all objects, ranging from 1 to len.Ties are given the average rank.
- Parameters:
adapter
- Data adapterdata
- Data arrayidx
- Data index- Returns:
- Array of scores
-
size
public 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)- Type Parameters:
A
- First array typeB
- Second array type- Parameters:
adapter1
- First data adapterdata1
- First data setadapter2
- Second data adapterdata2
- Second data set
-
size
public static <A> int size(NumberArrayAdapter<?,A> adapter, java.util.Collection<? extends A> data)
Validate the length of the two data sets (must be the same, and non-zero)- Type Parameters:
A
- First array type- Parameters:
adapter
- Data adapterdata
- Data sets
-
sortedIndex
public static <A> int[] sortedIndex(NumberArrayAdapter<?,A> adapter, A data, int len)
Build a sorted index of objects.- Parameters:
adapter
- Data adapterdata
- Data arraylen
- Length of data- Returns:
- Sorted index
-
-