Package com.bayesserver.statistics
Class MutualInformation
- java.lang.Object
-
- com.bayesserver.statistics.MutualInformation
-
public final class MutualInformation extends Object
Calculates mutual information or conditional mutual information, which measures the dependence between two variables.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
calculate(Distribution joint, VariableContext x, VariableContext y, LogarithmBase logarithmBase)
Measures the dependence between two variables.static double
calculate(Distribution joint, VariableContext x, VariableContext y, List<VariableContext> conditionOn, LogarithmBase logarithmBase)
Calculates mutual information or conditional mutual information, which measures the dependence between two variables.static double
calculate(Distribution joint, List<VariableContext> x, List<VariableContext> y, List<VariableContext> conditionOn, LogarithmBase logarithmBase)
Calculates mutual information or conditional mutual information, which measures the dependence between two variables.
-
-
-
Method Detail
-
calculate
public static double calculate(Distribution joint, VariableContext x, VariableContext y, LogarithmBase logarithmBase)
Measures the dependence between two variables.- Parameters:
joint
- The joint distribution over two (head) variables.x
- X in the expression I(X,Y).y
- Y in the expression I(X,Y).logarithmBase
- The logarithm base to use for the calculations.- Returns:
- The mutual information value.
-
calculate
public static double calculate(Distribution joint, VariableContext x, VariableContext y, List<VariableContext> conditionOn, LogarithmBase logarithmBase)
Calculates mutual information or conditional mutual information, which measures the dependence between two variables.- Parameters:
joint
- The joint distribution over two or more variables.x
- X in the expression I(X,Y) or I(X,Y|Z).y
- Y in the expression I(X,Y) or I(X,Y|Z).conditionOn
- Any conditional variables. I.e. Z in the expression I(X,Y|Z) when calculating conditional mutual information.logarithmBase
- The logarithm base to use for the calculations.- Returns:
- The mutual information value.
-
calculate
public static double calculate(Distribution joint, List<VariableContext> x, List<VariableContext> y, List<VariableContext> conditionOn, LogarithmBase logarithmBase)
Calculates mutual information or conditional mutual information, which measures the dependence between two variables.- Parameters:
joint
- The joint distribution over two or more variables.x
- X in the expression I(X,Y) or I(X,Y|Z).y
- Y in the expression I(X,Y) or I(X,Y|Z).conditionOn
- Any conditional variables. I.e. Z in the expression I(X,Y|Z) when calculating conditional mutual information.logarithmBase
- The logarithm base to use for the calculations.- Returns:
- The mutual information value.
-
-