jBNC Toolbox

jbnc.util
Class CondMutualInfo

java.lang.Object
  extended byjbnc.util.CondMutualInfo

public class CondMutualInfo
extends java.lang.Object

Estimate a joint probability distribution of three discreate variables

Since:
June 1, 1999
Author:
Jarek Sacha

Constructor Summary
CondMutualInfo(FrequencyCalc fc)
          Constructor for the CondMutualInfo object
 
Method Summary
 double[][] get(boolean[] cond, boolean usePriors, double alphaK)
          Return conditional mutual information matrix I.
 double[][] getProbX()
          Return copy of mariginal probability of class variable, p(X).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CondMutualInfo

public CondMutualInfo(FrequencyCalc fc)
Constructor for the CondMutualInfo object

Parameters:
fc - Description of Parameter
Method Detail

get

public double[][] get(boolean[] cond,
                      boolean usePriors,
                      double alphaK)
               throws java.lang.Exception
Return conditional mutual information matrix I. The condition may be on the last variable, Z, in the sample data set. When both variables are conditioned on Z the following formula is used:
              ___
             \                    p(x,y|z)
  I(X;Y|Z) = /__  p(x,y,z) log ---------------
             x,y                p(x|z) p(y|z)
 
When only one variable, say X, is conditioned on Z:
              ___
             \                   p(x,y|z)
  I(X;Y|Z) = /__  p(x,y,z) log -------------
             x,y                p(x|z) p(y)
 
When neither variable is conditioned on Z:
            ___
           \                 p(x,y)
  I(X;Y) = /__  p(x,y) log -----------
           x,y              p(x) p(y)
 

Parameters:
cond - weather a variable with corresponding index is conditioned on the class variable (Z).
usePriors - Description of Parameter
alphaK - Description of Parameter
Returns:
Description of the Returned Value
Throws:
java.lang.Exception - Description of Exception

getProbX

public double[][] getProbX()
                    throws java.lang.Exception
Return copy of mariginal probability of class variable, p(X).

Returns:
The ProbX value
Throws:
java.lang.Exception - Not initialized.

SourceForge.net Logo