edu.ksu.cis.bnj.bbn.learning
Class Learner

java.lang.Object
  extended byedu.ksu.cis.bnj.bbn.learning.Learner
All Implemented Interfaces:
Optionable
Direct Known Subclasses:
CIBasedLearner, PRMk2, ScoreBasedLearner

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

Learning

Author:
Roby Joehanes

Field Summary
protected  BBNNode[] bbnNodes
           
protected  boolean calculateCPT
           
protected  Data data
           
protected  java.util.Hashtable indexTable
           
static java.lang.String learnerClassName
           
static java.lang.String OPT_CALCULATE_RMSE
           
protected  java.util.Hashtable options
           
 
Fields inherited from interface edu.ksu.cis.kdd.util.gui.Optionable
OPT_OUTPUT_FILE
 
Constructor Summary
Learner()
           
Learner(Data t)
          Constructor for Learner.
 
Method Summary
 boolean getCalculateRMSE()
           
 java.util.Hashtable getCurrentOptions()
           
 Data getData()
           
 java.util.Hashtable getDefaultOptions()
           
abstract  BBNGraph getGraph()
          The learning algorithm is here
 java.lang.String getName()
           
 OptionGUI getOptionsDialog()
           
 java.lang.String getOutputFile()
           
 void initialize()
          This method will be invoked prior to getGraph.
 boolean isCalculateCPT()
           
static Learner load(java.lang.String className, Data t)
           
protected  BBNGraph populateNodes()
           
 void processParameters(java.lang.String[] args)
           
 void setCalculateCPT(boolean calculateCPT)
          Sets whether we should calculate the CPT.
 void setCalculateRMSE(boolean b)
           
 void setData(Data tuples)
          Sets the tuples.
 void setOption(java.lang.String key, java.lang.Object val)
           
 void setOptions(java.util.Hashtable optionTable)
           
 void setOutputFile(java.lang.String fn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

learnerClassName

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

OPT_CALCULATE_RMSE

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

options

protected java.util.Hashtable options

data

protected Data data

calculateCPT

protected boolean calculateCPT

bbnNodes

protected BBNNode[] bbnNodes

indexTable

protected java.util.Hashtable indexTable
Constructor Detail

Learner

public Learner()

Learner

public Learner(Data t)
Constructor for Learner.

Method Detail

getData

public Data getData()
Returns:
Table

setData

public void setData(Data tuples)
Sets the tuples.

Parameters:
tuples - The tuples to set

initialize

public void initialize()
This method will be invoked prior to getGraph. The purpose is to let the learner object to purge caches and stuff.


getGraph

public abstract BBNGraph getGraph()
The learning algorithm is here

Returns:
BBNGraph

isCalculateCPT

public boolean isCalculateCPT()
Returns:
boolean

setCalculateCPT

public void setCalculateCPT(boolean calculateCPT)
Sets whether we should calculate the CPT.

Parameters:
calculateCPT -

populateNodes

protected BBNGraph populateNodes()

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

setOutputFile

public void setOutputFile(java.lang.String fn)

getOutputFile

public java.lang.String getOutputFile()

setCalculateRMSE

public void setCalculateRMSE(boolean b)

getCalculateRMSE

public boolean getCalculateRMSE()

load

public static Learner load(java.lang.String className,
                           Data t)

processParameters

public void processParameters(java.lang.String[] args)

getName

public java.lang.String getName()