edu.ksu.cis.bnj.bbn.inference.elimbel
Class ElimBel

java.lang.Object
  extended byedu.ksu.cis.bnj.bbn.inference.Inference
      extended byedu.ksu.cis.bnj.bbn.inference.ExactInference
          extended byedu.ksu.cis.bnj.bbn.inference.elimbel.ElimBel
All Implemented Interfaces:
Optionable

public class ElimBel
extends ExactInference

Elim-Bel Implementation.

Author:
Roby Joehanes

Field Summary
protected  java.util.List[] baseNodes
           
protected  java.util.Hashtable indexCache
           
protected  BBNCPF[] lambda
           
protected  java.util.Set[] lambdaParameters
           
protected  java.util.Set[] lambdaTable
           
protected  int nodeCount
           
protected  BBNNode[] nodes
           
protected  java.util.List order
           
protected  InferenceResult result
           
 
Fields inherited from class edu.ksu.cis.bnj.bbn.inference.Inference
graph, inferenceClassName, MAP, MARGINALS, marginalsResult, MPE, OPT_RUN_TYPE, options
 
Fields inherited from interface edu.ksu.cis.kdd.util.gui.Optionable
OPT_OUTPUT_FILE
 
Constructor Summary
ElimBel()
           
ElimBel(BBNGraph g)
          Constructor for ElimBel.
 
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.ExactInference
computeRMSE
 
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
 

Field Detail

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
Constructor Detail

ElimBel

public ElimBel()

ElimBel

public ElimBel(BBNGraph g)
Constructor for ElimBel.

Parameters:
g -
Method Detail

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)