Class Entropy


  • public final class Entropy
    extends Object
    Calculates entropy, joint entropy or conditional entropy, which can be used to determine the uncertainty in the states of a discrete distribution. A higher values indicates less certainty about being in a particular state.
    • Method Detail

      • calculate

        public static double calculate​(Distribution joint,
                                       LogarithmBase logarithmBase)
        Measures the uncertainty of a distribution.
        Parameters:
        joint - The marginal or joint distribution.
        logarithmBase - The logarithm base to use for the calculations.
        Returns:
        The entropy value.
      • calculate

        public static double calculate​(Distribution joint,
                                       List<VariableContext> conditionOn,
                                       LogarithmBase logarithmBase)
        Measures the uncertainty of a distribution conditional on one or more variables.
        Parameters:
        joint - The marginal or joint distribution.
        conditionOn - Any conditional variables. I.e. those on the right hand side of H(Y|X) when calculating conditional entropy.
        logarithmBase - The logarithm base to use for the calculations.
        Returns:
        The entropy value.
      • calculate

        public static double calculate​(Table joint,
                                       List<VariableContext> conditionOn,
                                       LogarithmBase logarithmBase)
        Measures the uncertainty of a distribution conditional on one or more variables.
        Parameters:
        joint - The marginal or joint distribution.
        conditionOn - Any conditional variables. I.e. those on the right hand side of H(Y|X) when calculating conditional entropy.
        logarithmBase - The logarithm base to use for the calculations.
        Returns:
        The entropy value.
      • calculate

        public static double calculate​(Table joint,
                                       LogarithmBase logarithmBase)
        Measures the uncertainty of a distribution.
        Parameters:
        joint - The marginal or joint distribution.
        logarithmBase - The logarithm base to use for the calculations.
        Returns:
        The entropy value.
      • calculate

        public static double calculate​(CLGaussian joint,
                                       List<VariableContext> conditionOn,
                                       LogarithmBase logarithmBase)
        Measures the uncertainty of a distribution conditional on one or more variables.
        Parameters:
        joint - The marginal or joint distribution.
        conditionOn - Any conditional variables. I.e. those on the right hand side of H(Y|X) when calculating conditional entropy.
        logarithmBase - The logarithm base to use for the calculations.
        Returns:
        The entropy value.
      • calculate

        public static double calculate​(CLGaussian joint,
                                       LogarithmBase logarithmBase)
        Measures the uncertainty of a distribution.
        Parameters:
        joint - The marginal or joint distribution.
        logarithmBase - The logarithm base to use for the calculations.
        Returns:
        The entropy value.