edu.ucla.belief.approx
Class PropagationInferenceEngineImpl

Object
  extended by AbstractInferenceEngine
      extended by PropagationInferenceEngineImpl
All Implemented Interfaces:
PropagationInferenceEngine, EvidenceChangeListener, InferenceEngine, ChangeListener

public class PropagationInferenceEngineImpl
extends AbstractInferenceEngine
implements PropagationInferenceEngine, EvidenceChangeListener

Since:
20050505
Author:
arthur choi

Field Summary
 
Fields inherited from class AbstractInferenceEngine
DESCRIBE_CONDITIONAL, STR_CONSOLE_MESSAGE_COMP_MEM, STR_CONSOLE_MESSAGE_COMP_TIME, STR_CONSOLE_MESSAGE_PROP_TIME
 
Constructor Summary
PropagationInferenceEngineImpl(BeliefNetwork bn, BeliefPropagationSettings settings, Dynamator dyn)
           
 
Method Summary
 double betheFreeEnergy()
          This method computes the Bethe free energy approximation to the probability of evidence.
 String compilationStatus(PropertySuperintendent bn)
           
 Table conditional(FiniteVariable var)
          Returns P(var | observations).
 boolean converged()
           
 String convergenceSummary(boolean identify)
          Returns summary of convergence and statistics.
 void die()
           
 void evidenceChanged(EvidenceChangeEvent ece)
          interface EvidenceChangeListener
 Table familyConditional(FiniteVariable var)
          This computes an approximation to familyConditional.
 Table familyJoint(FiniteVariable var)
          Returns P(Family(var),evidence) where Family(var) is the set containing var and its parents.
 Table familyPartial(FiniteVariable var)
          interface PartialDerivativeEngine
 int getCacheHits()
           
 InferenceEngine handledClone(QuantitativeDependencyHandler handler)
           
 boolean isExhaustive()
           
 int iterations()
           
 Table joint(FiniteVariable var)
          Returns P(var,observations).
 Table partial(FiniteVariable var)
          interface PartialDerivativeEngine
 void printTables(PrintWriter out)
           
 double probability()
           
 char probabilityDisplayOperatorUnicode()
           
 boolean probabilitySupported()
           
 void setConvergenceThreshold(double thresh)
           
 void setCPT(FiniteVariable var)
          Sets the CPT associated with var to the values in vals.
 void setMaxIterations(int max)
           
 void setTimeoutMillis(long millis)
           
 long timeMillis()
           
 Set variables()
          Returns the set of all of the variables.
 void warning(EvidenceChangeEvent ece)
          interface EvidenceChangeListener
 
Methods inherited from class AbstractInferenceEngine
canonical, conditionals, describeConditionals, equals, getControlPanel, getDynamator, getEffectiveCPTData, getQuantitativeDependencyHandler, getValid, hashCode, isQuantitativeDependencyHandled, max, notoriousEdges, printInfoCompilation, printInfoPropagation, printTables, random, setControlPanel, setDynamator, setQuantitativeDependencyHandler, settingChanged, setValid, test
 
Methods inherited from class Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ChangeListener
settingChanged
 
Methods inherited from interface InferenceEngine
canonical, conditionals, describeConditionals, getControlPanel, getDynamator, getQuantitativeDependencyHandler, getValid, isQuantitativeDependencyHandled, max, notoriousEdges, printInfoCompilation, printInfoPropagation, random, setControlPanel, setDynamator, setQuantitativeDependencyHandler, setValid
 

Constructor Detail

PropagationInferenceEngineImpl

public PropagationInferenceEngineImpl(BeliefNetwork bn,
                                      BeliefPropagationSettings settings,
                                      Dynamator dyn)
Method Detail

compilationStatus

public String compilationStatus(PropertySuperintendent bn)
Specified by:
compilationStatus in interface InferenceEngine
Overrides:
compilationStatus in class AbstractInferenceEngine
Since:
20091226

die

public void die()
Specified by:
die in interface InferenceEngine
Overrides:
die in class AbstractInferenceEngine
Since:
20060321

setTimeoutMillis

public void setTimeoutMillis(long millis)

setMaxIterations

public void setMaxIterations(int max)

setConvergenceThreshold

public void setConvergenceThreshold(double thresh)

setCPT

public void setCPT(FiniteVariable var)
Description copied from interface: InferenceEngine
Sets the CPT associated with var to the values in vals. The ordering of vars must be consistent with the ordering returned by getCPT(var).

Specified by:
setCPT in interface InferenceEngine
Parameters:
var - The variable whose CPT we want to set.

probability

public double probability()
Specified by:
probability in interface InferenceEngine

probabilityDisplayOperatorUnicode

public char probabilityDisplayOperatorUnicode()
Specified by:
probabilityDisplayOperatorUnicode in interface InferenceEngine
Overrides:
probabilityDisplayOperatorUnicode in class AbstractInferenceEngine
Since:
20080221

betheFreeEnergy

public double betheFreeEnergy()
This method computes the Bethe free energy approximation to the probability of evidence.


probabilitySupported

public boolean probabilitySupported()
Specified by:
probabilitySupported in interface InferenceEngine
Overrides:
probabilitySupported in class AbstractInferenceEngine
Since:
20050830
See Also:
Dynamator.probabilitySupported(), PropagationEngineGenerator.probabilitySupported(), If you change the return value, you must consider changing the return value of PropagationEngineGenerator.probabilitySupported()

joint

public Table joint(FiniteVariable var)
Description copied from interface: InferenceEngine
Returns P(var,observations).

Specified by:
joint in interface InferenceEngine

conditional

public Table conditional(FiniteVariable var)
Description copied from interface: InferenceEngine
Returns P(var | observations).

Specified by:
conditional in interface InferenceEngine

getCacheHits

public int getCacheHits()

familyJoint

public Table familyJoint(FiniteVariable var)
Description copied from interface: InferenceEngine
Returns P(Family(var),evidence) where Family(var) is the set containing var and its parents.

Specified by:
familyJoint in interface InferenceEngine

familyConditional

public Table familyConditional(FiniteVariable var)
This computes an approximation to familyConditional. Mainly this is used to compute conditional.

Specified by:
familyConditional in interface InferenceEngine

partial

public Table partial(FiniteVariable var)
interface PartialDerivativeEngine


familyPartial

public Table familyPartial(FiniteVariable var)
interface PartialDerivativeEngine


warning

public void warning(EvidenceChangeEvent ece)
interface EvidenceChangeListener

Specified by:
warning in interface EvidenceChangeListener

evidenceChanged

public void evidenceChanged(EvidenceChangeEvent ece)
interface EvidenceChangeListener

Specified by:
evidenceChanged in interface EvidenceChangeListener

variables

public Set variables()
Description copied from interface: InferenceEngine
Returns the set of all of the variables.

Specified by:
variables in interface InferenceEngine

handledClone

public InferenceEngine handledClone(QuantitativeDependencyHandler handler)
Specified by:
handledClone in interface InferenceEngine

printTables

public void printTables(PrintWriter out)
Specified by:
printTables in interface InferenceEngine

isExhaustive

public boolean isExhaustive()
Specified by:
isExhaustive in interface InferenceEngine

convergenceSummary

public String convergenceSummary(boolean identify)
Returns summary of convergence and statistics. For SamIam GUI.

Specified by:
convergenceSummary in interface PropagationInferenceEngine

converged

public boolean converged()

iterations

public int iterations()

timeMillis

public long timeMillis()


Copyright 2010 UCLA Automated Reasoning Group