Class MutualInformationEquiwidthDependence

  • All Implemented Interfaces:
    Dependence

    public class MutualInformationEquiwidthDependence
    extends java.lang.Object
    implements Dependence
    Mutual Information (MI) dependence measure by dividing each attribute into equal-width bins. MI can be seen as Kullback–Leibler divergence of the joint distribution and the product of the marginal distributions.

    For normalization, the resulting values are scaled by mi/log(nbins). This both cancels out the logarithm base, and normalizes for the number of bins (a uniform distribution will yield a MI with itself of 1).

    TODO: Offer normalized and non-normalized variants?

    For a median-based discretization, see MaximumConditionalEntropy.

    Since:
    0.7.0
    Author:
    Erich Schubert
    • Constructor Detail

      • MutualInformationEquiwidthDependence

        protected MutualInformationEquiwidthDependence()
        Constructor - use STATIC 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 interface Dependence
        Type Parameters:
        A - First array type
        B - Second array type
        Parameters:
        adapter1 - First data adapter
        data1 - First data set
        adapter2 - Second data adapter
        data2 - Second data set
        Returns:
        Dependence measure