edu.ksu.cis.bnj.bbn.learning.score
Class ShieldScore
java.lang.Object
edu.ksu.cis.bnj.bbn.learning.LearnerScore
edu.ksu.cis.bnj.bbn.learning.score.SparseScore
edu.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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShieldScore
public ShieldScore()
- default constructor for ShieldScore
ShieldScore
public ShieldScore(Learner l)
- constructor for ShieldScore given a Learner object
- Parameters:
l
-
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 nodeX_j
- The index of the parent candidateparentTable
- 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()