edu.ucla.belief.inference
Class BeliefCompilation

Object
  extended by BeliefCompilation
All Implemented Interfaces:
Serializable

public class BeliefCompilation
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
 JoinTree myJoinTree
           
 
Constructor Summary
BeliefCompilation(BeliefNetwork bn, ArithmeticExpression expr, TableIndex[] inds, Map likelihoodIndices, Map familyIndices)
          Creates a new BeliefCompilation.
BeliefCompilation(BeliefNetwork bn, ArithmeticExpression expr, TableIndex[] inds, Map likelihoodIndices, Map familyIndices, JoinTree jt, Table[] tables)
           
 
Method Summary
 int edgeCount()
          Deprecated.  
 BeliefNetwork getBeliefNetwork()
           
 ArithmeticExpression getExpression()
           
 Table getFamilyPartial(FiniteVariable var)
          Returns the partial derivative of the CPT for the current values of the parameters.
 Table getFamilyTable(FiniteVariable var)
          Returns the value of the CPT for the variable.
 JoinTree getJoinTree()
           
 Table getLikelihood(FiniteVariable var)
          Returns the likelihoods(Evidence indicators) for the given variable.
 double getMemoryRequirements()
           
 Table getPartial(FiniteVariable var)
          Returns the partial derivative of the likelihoods for the current values of the parameters.
 double getPropagationTime()
           
 Table[] getTables()
           
 double getValue()
           
 Map lambdaLocations()
           
 int nodeCount()
          Deprecated.  
 void setFamily(FiniteVariable var, double[] vals)
          Sets the family parameters for the variable supplied.
 void setLikelihood(FiniteVariable var, double[] vals)
          Sets the likelihood parameters for the variable supplied.
 Map thetaLocations()
           
 Set variables()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myJoinTree

public final JoinTree myJoinTree
Constructor Detail

BeliefCompilation

public BeliefCompilation(BeliefNetwork bn,
                         ArithmeticExpression expr,
                         TableIndex[] inds,
                         Map likelihoodIndices,
                         Map familyIndices)
Creates a new BeliefCompilation. This method is not intended for general use, but is provided for any brave souls who wish to perform custom compilations. Typical users should use the compilation routine provided in BeliefNetworks.

Parameters:
expr - An ArithmeticExpression that encapsulates the dependencies between the network parameters.
inds - The TableIndex for each of the parameters in expr.
likelihoodIndices - A mapping from each variable to the index of that parameter in expr.
familyIndices - A mapping from each variable to the corresponding index of its family in expr.

BeliefCompilation

public BeliefCompilation(BeliefNetwork bn,
                         ArithmeticExpression expr,
                         TableIndex[] inds,
                         Map likelihoodIndices,
                         Map familyIndices,
                         JoinTree jt,
                         Table[] tables)
Since:
110102
Method Detail

getTables

public Table[] getTables()
Since:
061504

getBeliefNetwork

public BeliefNetwork getBeliefNetwork()
Since:
071902

getJoinTree

public JoinTree getJoinTree()
Since:
110102

getLikelihood

public Table getLikelihood(FiniteVariable var)
Returns the likelihoods(Evidence indicators) for the given variable.


lambdaLocations

public Map lambdaLocations()

thetaLocations

public Map thetaLocations()

getFamilyTable

public Table getFamilyTable(FiniteVariable var)
Returns the value of the CPT for the variable.


getPartial

public Table getPartial(FiniteVariable var)
Returns the partial derivative of the likelihoods for the current values of the parameters.


getFamilyPartial

public Table getFamilyPartial(FiniteVariable var)
Returns the partial derivative of the CPT for the current values of the parameters.


setLikelihood

public void setLikelihood(FiniteVariable var,
                          double[] vals)
Sets the likelihood parameters for the variable supplied. The length of vals should be the same as the the number of instantiations var can take on.


setFamily

public void setFamily(FiniteVariable var,
                      double[] vals)
Sets the family parameters for the variable supplied. The ordering in vals should correspond to the ordering in the table returned from getFamily.


getValue

public double getValue()

variables

public Set variables()

nodeCount

public int nodeCount()
Deprecated. 


edgeCount

public int edgeCount()
Deprecated. 


getExpression

public ArithmeticExpression getExpression()

getPropagationTime

public double getPropagationTime()

getMemoryRequirements

public double getMemoryRequirements()


Copyright 2010 UCLA Automated Reasoning Group