|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.duke.cs.banjo.learner.components.Evaluator
Combines common code shared by the different evaluator implementations.
Details:
Change History:
Created on Apr 13, 2004
9/6/2005 (v1.0.3) hjs Defect in constructor: Make use of caching arrays conditional, so they are only created when needed
Nested Class Summary | |
protected class |
Evaluator.ObservationsSelector
|
Field Summary | |
(package private) static double[] |
b
Used in the log-gamma computation. |
protected double |
cachedCurrentNodePreviousScore
|
protected double |
cachedNetworkPreviousScore
|
protected double |
cachedNetworkScore
|
protected double[] |
cachedNodeScores
|
protected double |
cachedParentNodePreviousScore
|
protected long[] |
collisionsInCacheTracker
|
protected long |
computedScoreTracker
|
protected long |
crossCheckCachedScoreTracker
|
protected NodeScoreCacheItemI |
currentNodeScoreHashItem
|
protected int |
fastCacheLevel
|
protected java.lang.StringBuffer |
feedbackBuffer
|
protected long[] |
fetchedCachedScoreTracker
|
protected int |
highestParentCountEncountered
|
protected int |
maxMarkovLag
|
protected int |
minMarkovLag
|
protected java.util.HashMap |
nodeScoreHashMap
|
protected long[] |
placedInCacheScoreTracker
|
protected Settings |
processData
|
protected NodeScoreCacheItemI |
retrievedNodeScoreHashItem
|
protected boolean |
useBasicCache
|
protected boolean |
useCache
|
protected int |
varCount
|
Constructor Summary | |
Evaluator(BayesNetManagerI _initialBayesNet,
Settings _processData)
Constructor |
Method Summary | |
abstract void |
adjustNodeScoresForUndo(BayesNetChangeI suggestedBayesNetChange)
Adjusts the various internal score containers when a bayesNetChange is not permanently kept. |
void |
cleanupOnException()
|
abstract double |
computeInitialNetworkScore(BayesNetManagerI currentBayesNetManager)
|
protected static double |
loggamma(double x)
|
protected double |
logGamma(double arg)
|
java.lang.StringBuffer |
provideCollectedStatistics()
|
abstract double |
updateNetworkScore(BayesNetManagerI currentBayesNetManager,
BayesNetChangeI currentBayesNetChange)
Computes the score of the network described by the bayesNetManager, based on the proposed bayesNetChange. |
void |
updateProcessData(Settings _processData)
For future use. |
private boolean |
validateRequiredData()
Validates the settings values required for loading the evaluator base class (i.e., the cache settings). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final int varCount
protected final int minMarkovLag
protected final int maxMarkovLag
protected NodeScoreCacheItemI currentNodeScoreHashItem
protected NodeScoreCacheItemI retrievedNodeScoreHashItem
protected java.util.HashMap nodeScoreHashMap
protected java.lang.StringBuffer feedbackBuffer
protected double cachedNetworkScore
protected double[] cachedNodeScores
protected double cachedCurrentNodePreviousScore
protected double cachedParentNodePreviousScore
protected double cachedNetworkPreviousScore
protected long computedScoreTracker
protected long[] fetchedCachedScoreTracker
protected long[] placedInCacheScoreTracker
protected long[] collisionsInCacheTracker
protected long crossCheckCachedScoreTracker
protected int highestParentCountEncountered
protected Settings processData
protected boolean useCache
protected boolean useBasicCache
protected int fastCacheLevel
static double[] b
Constructor Detail |
public Evaluator(BayesNetManagerI _initialBayesNet, Settings _processData) throws java.lang.Exception
Method Detail |
private boolean validateRequiredData() throws java.lang.Exception
java.lang.Exception
protected double logGamma(double arg)
protected static double loggamma(double x)
public abstract double computeInitialNetworkScore(BayesNetManagerI currentBayesNetManager) throws java.lang.Exception
computeInitialNetworkScore
in interface EvaluatorI
currentBayesNetManager
- The underlying network.
java.lang.Exception
public abstract double updateNetworkScore(BayesNetManagerI currentBayesNetManager, BayesNetChangeI currentBayesNetChange) throws java.lang.Exception
EvaluatorI
updateNetworkScore
in interface EvaluatorI
currentBayesNetManager
- The current underlying network.currentBayesNetChange
- The proposed change to the network.
java.lang.Exception
public abstract void adjustNodeScoresForUndo(BayesNetChangeI suggestedBayesNetChange) throws java.lang.Exception
EvaluatorI
adjustNodeScoresForUndo
in interface EvaluatorI
suggestedBayesNetChange
- The change to the network whose effect needs
to be undone.
java.lang.Exception
public void updateProcessData(Settings _processData) throws java.lang.Exception
EvaluatorI
updateProcessData
in interface EvaluatorI
_processData
- The data to be exchanged.
java.lang.Exception
public java.lang.StringBuffer provideCollectedStatistics() throws java.lang.Exception
provideCollectedStatistics
in interface EvaluatorI
java.lang.Exception
public void cleanupOnException() throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |