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

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.ShieldScore

public class ShieldScore
extends SparseScore

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

Author:
Roby Joehanes Last modified 05 Apr 2003

Field Summary
 
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
ShieldScore()
          default constructor for ShieldScore
ShieldScore(Learner l)
          constructor for ShieldScore given a Learner object
 
Method Summary
 double getScore(int X_i, int X_j, java.util.Set[] parentTable)
          calculate mutual information I(X_i ; X_j, Pa(X_i)) = D_KL(\hat P(X_i, X_j, Pa(X_i)) || \hat P(X_i) * \hat P(X_j, Pa(X_i))) = \Sum_{X_i, X_j, Pa(X_i)} \hat P(X_i, X_j, Pa(X_i)) log \frac{\hat P(X_i, X_j, Pa(X_i))}{\hat P(X_i) * \hat P(X_j, Pa(X_i))}
 void initialize()
          This is just to reset the cache.
protected  int iterateUniqueInstantiation(int depth, Tally tally, int total)
          Recursively filter out the data according to the current node
 
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
 

Constructor Detail

ShieldScore

public ShieldScore()
default constructor for ShieldScore


ShieldScore

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

Parameters:
l -
Method Detail

getScore

public double getScore(int X_i,
                       int X_j,
                       java.util.Set[] parentTable)
calculate mutual information I(X_i ; X_j, Pa(X_i)) = D_KL(\hat P(X_i, X_j, Pa(X_i)) || \hat P(X_i) * \hat P(X_j, Pa(X_i))) = \Sum_{X_i, X_j, Pa(X_i)} \hat P(X_i, X_j, Pa(X_i)) log \frac{\hat P(X_i, X_j, Pa(X_i))}{\hat P(X_i) * \hat P(X_j, Pa(X_i))}

Specified by:
getScore in class LearnerScore
Parameters:
X_i - The index of the currently evaluated node
X_j - 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 int iterateUniqueInstantiation(int depth,
                                         Tally tally,
                                         int total)
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()