com.bayesserver.statistics

## 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 Summary

Methods
Modifier and Type Method and Description
`static double` ```calculate(CLGaussian joint, List<VariableContext> conditionOn, LogarithmBase logarithmBase)```
Measures the uncertainty of a distribution conditional on one or more variables.
`static double` ```calculate(CLGaussian joint, LogarithmBase logarithmBase)```
Measures the uncertainty of a distribution.
`static double` ```calculate(Distribution joint, List<VariableContext> conditionOn, LogarithmBase logarithmBase)```
Measures the uncertainty of a distribution conditional on one or more variables.
`static double` ```calculate(Distribution joint, LogarithmBase logarithmBase)```
Measures the uncertainty of a distribution.
`static double` ```calculate(Table joint, List<VariableContext> conditionOn, LogarithmBase logarithmBase)```
Measures the uncertainty of a distribution conditional on one or more variables.
`static double` ```calculate(Table joint, LogarithmBase logarithmBase)```
Measures the uncertainty of a distribution.
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### 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.