edu.ksu.cis.bnj.bbn.inference.elimbel
Class ElimBel
java.lang.Object
edu.ksu.cis.bnj.bbn.inference.Inference
edu.ksu.cis.bnj.bbn.inference.ExactInference
edu.ksu.cis.bnj.bbn.inference.elimbel.ElimBel
- All Implemented Interfaces:
- Optionable
- public class ElimBel
- extends ExactInference
Elim-Bel Implementation.
- Author:
- Roby Joehanes
Method Summary |
protected void |
backwardPhase()
Backward phase of variable elimination. |
protected void |
buildLambda(int curIndex,
java.util.LinkedList nodeList,
java.util.Hashtable curInst)
|
protected void |
forwardPhase()
|
InferenceResult |
getMarginals()
Getting the result of the marginals (i.e. the belief revision) |
java.lang.String |
getName()
|
java.util.List |
getOrder()
|
static void |
main(java.lang.String[] args)
|
void |
setOrder(java.util.List order)
Sets the order. |
protected java.util.List |
sort()
|
protected java.util.List |
topologicalSort()
Manual topological sort...
|
Methods inherited from class edu.ksu.cis.bnj.bbn.inference.Inference |
execute, getCurrentOptions, getDefaultOptions, getGraph, getMAP, getMarginalsResult, getMPE, getOptionsDialog, getOutputFile, getRunType, load, setGraph, setOption, setOptions, setOutputFile, setRunType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
order
protected java.util.List order
lambda
protected BBNCPF[] lambda
nodes
protected BBNNode[] nodes
lambdaParameters
protected java.util.Set[] lambdaParameters
lambdaTable
protected java.util.Set[] lambdaTable
baseNodes
protected java.util.List[] baseNodes
indexCache
protected java.util.Hashtable indexCache
nodeCount
protected int nodeCount
result
protected InferenceResult result
ElimBel
public ElimBel()
ElimBel
public ElimBel(BBNGraph g)
- Constructor for ElimBel.
- Parameters:
g
-
getName
public java.lang.String getName()
- Specified by:
getName
in class Inference
getOrder
public java.util.List getOrder()
- Returns:
- List
setOrder
public void setOrder(java.util.List order)
- Sets the order.
- Parameters:
order
- The order to set
topologicalSort
protected java.util.List topologicalSort()
- Manual topological sort...
OpenJGraph already provide one
sort
protected java.util.List sort()
getMarginals
public InferenceResult getMarginals()
- Description copied from class:
Inference
- Getting the result of the marginals (i.e. the belief revision)
- Specified by:
getMarginals
in class Inference
- Returns:
- InferenceResult The marginals
backwardPhase
protected void backwardPhase()
- Backward phase of variable elimination. This involves constructing
buckets and building lambda functions (or, rather, lambda table)
buildLambda
protected void buildLambda(int curIndex,
java.util.LinkedList nodeList,
java.util.Hashtable curInst)
forwardPhase
protected void forwardPhase()
main
public static void main(java.lang.String[] args)