Package elki.math.statistics.dependence
Class MaximumConditionalEntropy
- java.lang.Object
-
- elki.math.statistics.dependence.MaximumConditionalEntropy
-
- All Implemented Interfaces:
Dependence
@Reference(authors="D. Guo", title="Coordinating computational and visual approaches for interactive feature selection and multivariate clustering", booktitle="Information Visualization, 2(4)", url="https://doi.org/10.1057/palgrave.ivs.9500053", bibkey="DBLP:journals/ivs/Guo03") public class MaximumConditionalEntropy extends java.lang.Object implements Dependence
Compute a mutual information based dependence measure using a nested means discretization, originally proposed for ordering axes in parallel coordinate plots.Reference:
D. Guo
Coordinating computational and visual approaches for interactive feature selection and multivariate clustering
Information Visualization, 2(4), 2003.- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMaximumConditionalEntropy.ParParameterization class.-
Nested classes/interfaces inherited from interface elki.math.statistics.dependence.Dependence
Dependence.Utils
-
-
Field Summary
Fields Modifier and Type Field Description static MaximumConditionalEntropySTATICStatic instance.static intTARGETDesired size: 35 observations.
-
Constructor Summary
Constructors Constructor Description MaximumConditionalEntropy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private <A> java.util.ArrayList<int[]>buildPartitions(NumberArrayAdapter<?,A> adapter1, A data1, int len, int depth)Partitions an attribute.<A,B>
doubledependence(NumberArrayAdapter<?,A> adapter1, A data1, NumberArrayAdapter<?,B> adapter2, B data2)Measure the dependence of two variables.private voiddivide(int[] idx, double[] data, java.util.ArrayList<int[]> ret, int start, int end, int depth)Recursive call to further subdivide the array.private doublegetMCEntropy(int[][] mat, java.util.ArrayList<int[]> partsx, java.util.ArrayList<int[]> partsy, int size, int gridsize, double loggrid)Compute the MCE entropy value.private voidintersectionMatrix(int[][] res, java.util.ArrayList<int[]> partsx, java.util.ArrayList<int[]> partsy, int gridsize)Intersect the two 1d grid decompositions, to obtain a 2d matrix.private intintersectionSize(int[] px, int[] py)Compute the intersection of two sorted integer lists.-
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, dependence
-
-
-
-
Field Detail
-
STATIC
public static final MaximumConditionalEntropy STATIC
Static instance.
-
TARGET
public static final int TARGET
Desired size: 35 observations. While this could trivially be made parameterizable, it is a reasonable rule of thumb and not expected to have a major effect.- See Also:
- Constant Field Values
-
-
Method Detail
-
dependence
public <A,B> double dependence(NumberArrayAdapter<?,A> adapter1, A data1, NumberArrayAdapter<?,B> adapter2, B data2)
Description copied from interface:DependenceMeasure the dependence of two variables.This is the more flexible API, which allows using different internal data representations.
- Specified by:
dependencein 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
-
buildPartitions
private <A> java.util.ArrayList<int[]> buildPartitions(NumberArrayAdapter<?,A> adapter1, A data1, int len, int depth)
Partitions an attribute.- Parameters:
adapter1- Data adapterdata1- Data setlen- Length of datadepth- Splitting depth- Returns:
- List of sorted objects
-
divide
private void divide(int[] idx, double[] data, java.util.ArrayList<int[]> ret, int start, int end, int depth)Recursive call to further subdivide the array.- Parameters:
idx- Object indexes.data- 1D data, sortedret- Output indexstart- Interval startend- Interval enddepth- Depth
-
intersectionMatrix
private void intersectionMatrix(int[][] res, java.util.ArrayList<int[]> partsx, java.util.ArrayList<int[]> partsy, int gridsize)Intersect the two 1d grid decompositions, to obtain a 2d matrix.- Parameters:
res- Output matrix to fillpartsx- Partitions in first componentpartsy- Partitions in second component.gridsize- Size of partition decomposition
-
intersectionSize
private int intersectionSize(int[] px, int[] py)Compute the intersection of two sorted integer lists.- Parameters:
px- First listpy- Second list- Returns:
- Intersection size.
-
getMCEntropy
private double getMCEntropy(int[][] mat, java.util.ArrayList<int[]> partsx, java.util.ArrayList<int[]> partsy, int size, int gridsize, double loggrid)Compute the MCE entropy value.- Parameters:
mat- Partition size matrixpartsx- Partitions on Xpartsy- Partitions on Ysize- Data set sizegridsize- Size of gridsloggrid- Logarithm of grid sizes, for normalization- Returns:
- MCE score.
-
-