edu.ksu.cis.bnj.bbn.learning.score
Class DiscrepancyScore
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.DiscrepancyScore
- public class DiscrepancyScore
- extends SparseScore
A class that implements the discrepancy score as described in Friedman's paper
(i.e. MDisc).
- Author:
- Roby Joehanes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
total
protected int total
tuples
protected Table tuples
tallyMatrix
protected short[][] tallyMatrix
parentTableCache
protected java.util.Set[] parentTableCache
DiscrepancyScore
public DiscrepancyScore()
DiscrepancyScore
public DiscrepancyScore(Learner l)
- Shielding Score constructor
- Parameters:
l
-
tallyPrecache
protected void tallyPrecache()
prepareNodes
protected int[] prepareNodes(int node,
java.util.Set[] parentTable)
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 nodecandidate
- 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 void iterateUniqueInstantiation(int depth,
Tally tally)
- Recursively filter out the data according to the current node
- Parameters:
tally
-
initialize
public void initialize()
- Overrides:
initialize
in class LearnerScore