edu.ksu.cis.bnj.bbn.learning.score
Class MaximizeScore

java.lang.Object
  extended byedu.ksu.cis.bnj.bbn.learning.LearnerScore
      extended byedu.ksu.cis.bnj.bbn.learning.score.SparseScore
          extended byedu.ksu.cis.bnj.bbn.learning.score.MaximizeScore

public class MaximizeScore
extends SparseScore

Measure_Score score from Friedman, Nachman, and Pe'er [1999] Measure_Score(X_i, X_j | B) = Score(X_i ; X_j, Pa(X_i), D)

Author:
William H. Hsu Last modified 03 Apr 2003

Field Summary
protected  int curNode
           
protected  int nodeArity
           
protected  double total
           
protected  java.util.Hashtable value2tally
           
 
Fields inherited from class edu.ksu.cis.bnj.bbn.learning.score.SparseScore
arityCache, attributeSize, maxArity, nodes, totalRows, tupleSize
 
Fields inherited from class edu.ksu.cis.bnj.bbn.learning.LearnerScore
NO_CANDIDATES, owner, tally
 
Constructor Summary
MaximizeScore()
          default constructor for MaximizeScore
MaximizeScore(Learner l)
          constructor for MaximizeScore given a Learner object
 
Method Summary
 double getScore(int curNode, int candidate, java.util.Set[] parentTable)
          Get the score
 void initialize()
          This is just to reset the cache.
protected  void iterateUniqueInstantiation(int depth, Tally tally)
          Recursively filter out the data according to the current node
protected  void precache()
           
 
Methods inherited from class edu.ksu.cis.bnj.bbn.learning.score.SparseScore
initializeCache
 
Methods inherited from class edu.ksu.cis.bnj.bbn.learning.LearnerScore
getTallyer, setData, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value2tally

protected java.util.Hashtable value2tally

total

protected double total

curNode

protected int curNode

nodeArity

protected int nodeArity
Constructor Detail

MaximizeScore

public MaximizeScore()
default constructor for MaximizeScore


MaximizeScore

public MaximizeScore(Learner l)
constructor for MaximizeScore given a Learner object

Parameters:
l -
Method Detail

precache

protected void precache()

getScore

public double getScore(int curNode,
                       int candidate,
                       java.util.Set[] parentTable)
Description copied from class: LearnerScore
Get the score

Specified by:
getScore in class LearnerScore
Parameters:
curNode - The index of the currently evaluated node
candidate - The index of the parent candidate
parentTable - The array of Sets of integers. Each integer in the set is the index of currently assembled parent of each node.
Returns:
double the score
See Also:
edu.ksu.cis.bnj.bbn.learning.LearnerScore#getScore(java.lang.String, java.util.Set)

iterateUniqueInstantiation

protected void iterateUniqueInstantiation(int depth,
                                          Tally tally)
Recursively filter out the data according to the current node

Parameters:
tally -

initialize

public void initialize()
This is just to reset the cache. Since it is not dependent on tuple numbers, we can simply ignore this.

Overrides:
initialize in class LearnerScore
See Also:
LearnerScore.initialize()