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

java.lang.Object
  extended byedu.ksu.cis.bnj.bbn.learning.Learner
      extended byedu.ksu.cis.bnj.bbn.learning.ScoreBasedLearner
All Implemented Interfaces:
Optionable
Direct Known Subclasses:
BDEBasedLearner, ExhaustiveEval, GAWK, GreedySL, HillClimbingSL, SimAnnealSL

public abstract class ScoreBasedLearner
extends Learner

Score-based learning classes

Author:
Roby Joehanes

Field Summary
protected  LearnerScore candidateScorer
           
static int defaultParentLimit
           
protected  int parentLimit
          Set the upper bound on parent limits.
protected  LearnerScore structureScorer
           
 
Fields inherited from class edu.ksu.cis.bnj.bbn.learning.Learner
bbnNodes, calculateCPT, data, indexTable, learnerClassName, OPT_CALCULATE_RMSE, options
 
Fields inherited from interface edu.ksu.cis.kdd.util.gui.Optionable
OPT_OUTPUT_FILE
 
Constructor Summary
ScoreBasedLearner()
           
ScoreBasedLearner(Data t)
          Constructor for ScoreBasedLearning.
ScoreBasedLearner(Data t, LearnerScore s)
          Constructor for ScoreBasedLearning.
ScoreBasedLearner(Data t, LearnerScore s, LearnerScore s2)
          Constructor for ScoreBasedLearning.
 
Method Summary
protected  void computeCPT(BBNGraph g)
           
 int getParentLimit()
           
protected  void iterateUniqueInstantiation(int depth, int[] nodes, int[] valInts, java.util.Hashtable curQuery)
          Iterate through unique instantiation of children given parents.
 void setCandidateScorer(LearnerScore scorer)
          Sets the candidate scorer.
 void setParentLimit(int parentLimit)
          Sets the parentLimit.
 void setStructureScorer(LearnerScore structureScorer)
          Sets the structure scorer.
 void setTable(Table tuples)
           
 
Methods inherited from class edu.ksu.cis.bnj.bbn.learning.Learner
getCalculateRMSE, getCurrentOptions, getData, getDefaultOptions, getGraph, getName, getOptionsDialog, getOutputFile, initialize, isCalculateCPT, load, populateNodes, processParameters, setCalculateCPT, setCalculateRMSE, setData, setOption, setOptions, setOutputFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultParentLimit

public static final int defaultParentLimit
See Also:
Constant Field Values

candidateScorer

protected LearnerScore candidateScorer

structureScorer

protected LearnerScore structureScorer

parentLimit

protected int parentLimit
Set the upper bound on parent limits. Defaults to 5

Constructor Detail

ScoreBasedLearner

public ScoreBasedLearner()

ScoreBasedLearner

public ScoreBasedLearner(Data t)
Constructor for ScoreBasedLearning.

Parameters:
t -

ScoreBasedLearner

public ScoreBasedLearner(Data t,
                         LearnerScore s)
Constructor for ScoreBasedLearning.

Parameters:
t -

ScoreBasedLearner

public ScoreBasedLearner(Data t,
                         LearnerScore s,
                         LearnerScore s2)
Constructor for ScoreBasedLearning.

Parameters:
t -
Method Detail

setCandidateScorer

public void setCandidateScorer(LearnerScore scorer)
Sets the candidate scorer.


setStructureScorer

public void setStructureScorer(LearnerScore structureScorer)
Sets the structure scorer.

Parameters:
structureScorer - The structureScorer to set

setTable

public void setTable(Table tuples)

getParentLimit

public int getParentLimit()
Returns:
int

setParentLimit

public void setParentLimit(int parentLimit)
Sets the parentLimit.

Parameters:
parentLimit - The parentLimit to set

computeCPT

protected void computeCPT(BBNGraph g)

iterateUniqueInstantiation

protected void iterateUniqueInstantiation(int depth,
                                          int[] nodes,
                                          int[] valInts,
                                          java.util.Hashtable curQuery)

Iterate through unique instantiation of children given parents. To invoke: iterateUniqueInstantiation(nodeList, new Hashtable(), tallyer);

Parameters:
nodes - List of BBNNodes being iterated. The last one must be child node