edu.ksu.cis.bnj.bbn.inference
Class Inference

java.lang.Object
  extended byedu.ksu.cis.bnj.bbn.inference.Inference
All Implemented Interfaces:
Optionable
Direct Known Subclasses:
ApproximateInference, ExactInference

public abstract class Inference
extends java.lang.Object
implements Optionable

Abstract Inference class

Author:
robbyjo

Field Summary
protected  BBNGraph graph
           
static java.lang.String inferenceClassName
           
static int MAP
           
static int MARGINALS
           
protected  InferenceResult marginalsResult
           
static int MPE
           
static java.lang.String OPT_RUN_TYPE
           
protected  java.util.Hashtable options
           
 
Fields inherited from interface edu.ksu.cis.kdd.util.gui.Optionable
OPT_OUTPUT_FILE
 
Constructor Summary
Inference()
           
Inference(BBNGraph g)
           
 
Method Summary
 void execute()
           
 java.util.Hashtable getCurrentOptions()
           
 java.util.Hashtable getDefaultOptions()
           
 BBNGraph getGraph()
          Returns the graph.
 java.util.Hashtable getMAP()
          Get the Maximum Aposteriori Probabilities (MAP)
abstract  InferenceResult getMarginals()
          Getting the result of the marginals (i.e. the belief revision)
 InferenceResult getMarginalsResult()
           
 java.util.Hashtable getMPE()
          Get the Most Probable Explanation (MPE) values for each nodes.
abstract  java.lang.String getName()
           
 OptionGUI getOptionsDialog()
           
 java.lang.String getOutputFile()
           
 int getRunType()
           
static Inference load(java.lang.String className, BBNGraph g)
           
 void setGraph(BBNGraph graph)
          Sets the graph.
 void setOption(java.lang.String key, java.lang.Object val)
           
 void setOptions(java.util.Hashtable optionTable)
           
 void setOutputFile(java.lang.String fn)
           
 void setRunType(int type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inferenceClassName

public static final java.lang.String inferenceClassName
See Also:
Constant Field Values

OPT_RUN_TYPE

public static final java.lang.String OPT_RUN_TYPE
See Also:
Constant Field Values

MAP

public static final int MAP
See Also:
Constant Field Values

MPE

public static final int MPE
See Also:
Constant Field Values

MARGINALS

public static final int MARGINALS
See Also:
Constant Field Values

options

protected java.util.Hashtable options

marginalsResult

protected InferenceResult marginalsResult

graph

protected BBNGraph graph
Constructor Detail

Inference

public Inference()

Inference

public Inference(BBNGraph g)
Method Detail

getGraph

public BBNGraph getGraph()
Returns the graph.

Returns:
BBNGraph

setGraph

public void setGraph(BBNGraph graph)
Sets the graph.

Parameters:
graph - The graph to set

getMarginals

public abstract InferenceResult getMarginals()
Getting the result of the marginals (i.e. the belief revision)

Returns:
InferenceResult The marginals

getName

public abstract java.lang.String getName()

getMPE

public java.util.Hashtable getMPE()
Get the Most Probable Explanation (MPE) values for each nodes.

Returns:
Hashtable the MPE in the format of NodeName -> MostProbableValue

getMAP

public java.util.Hashtable getMAP()
Get the Maximum Aposteriori Probabilities (MAP)

Returns:
Hashtable the MAP in the format of NodeName -> MostProbableValue

getOptionsDialog

public OptionGUI getOptionsDialog()
Specified by:
getOptionsDialog in interface Optionable

setOptions

public void setOptions(java.util.Hashtable optionTable)
Specified by:
setOptions in interface Optionable

setOption

public void setOption(java.lang.String key,
                      java.lang.Object val)
Specified by:
setOption in interface Optionable

getDefaultOptions

public java.util.Hashtable getDefaultOptions()
Specified by:
getDefaultOptions in interface Optionable

getCurrentOptions

public java.util.Hashtable getCurrentOptions()
Specified by:
getCurrentOptions in interface Optionable

setRunType

public void setRunType(int type)

getRunType

public int getRunType()

setOutputFile

public void setOutputFile(java.lang.String fn)

getOutputFile

public java.lang.String getOutputFile()

execute

public void execute()

getMarginalsResult

public InferenceResult getMarginalsResult()

load

public static Inference load(java.lang.String className,
                             BBNGraph g)