edu.duke.cs.banjo.learner.components
Class Proposer

java.lang.Object
  extended byedu.duke.cs.banjo.learner.components.Proposer
All Implemented Interfaces:
ProposerI
Direct Known Subclasses:
ProposerAllLocalMoves, ProposerRandomLocalMove

public abstract class Proposer
extends java.lang.Object
implements ProposerI

Combines common code shared by the different proposer implementations.

Details:

Change History:
Created on Apr 5, 2004

2/14/2005 (v2.0) hjs Add option to omit reversals from proposed changes (for any lag)
3/24/2008 (v2.2) hjs Modify access to random numbers.

Author:
Jurgen Sladeczek (hjs)
For the latest info, please visit www.cs.duke.edu.

Nested Class Summary
protected  class Proposer.AllowEdgeReversalSelector
           
protected  class Proposer.EdgeSelector
           
protected  class Proposer.OmitEdgeReversalSelector
           
protected  class Proposer.StructureSelector
           
 
Field Summary
protected  BayesNetChangeI bayesNetChange
           
protected  BayesNetManagerI bayesNetManager
           
protected  java.util.ArrayList changeList
           
protected  int changeTypeCount
           
protected  Proposer.EdgeSelector edgeSelector
           
protected  int maxMarkovLag
           
protected  int maxParentCount
           
protected  int minMarkovLag
           
protected  Settings processData
           
protected  long[] proposedChangeTypeTracker
           
protected  java.util.Random rnd
           
protected  Proposer.StructureSelector structureSelector
           
protected  int varCount
           
 
Constructor Summary
Proposer(BayesNetManagerI _initialBayesNet, Settings _processData)
           
 
Method Summary
 java.lang.StringBuffer provideCollectedStatistics()
           
abstract  BayesNetChangeI suggestBayesNetChange(BayesNetManagerI _bayesNetManager)
           
 void updateProcessData(Settings _processData)
          For future use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.duke.cs.banjo.learner.components.ProposerI
suggestBayesNetChanges
 

Field Detail

bayesNetManager

protected BayesNetManagerI bayesNetManager

bayesNetChange

protected BayesNetChangeI bayesNetChange

changeList

protected java.util.ArrayList changeList

varCount

protected final int varCount

minMarkovLag

protected final int minMarkovLag

maxMarkovLag

protected final int maxMarkovLag

changeTypeCount

protected final int changeTypeCount

maxParentCount

protected final int maxParentCount

proposedChangeTypeTracker

protected long[] proposedChangeTypeTracker

processData

protected Settings processData

rnd

protected final java.util.Random rnd

edgeSelector

protected Proposer.EdgeSelector edgeSelector

structureSelector

protected Proposer.StructureSelector structureSelector
Constructor Detail

Proposer

public Proposer(BayesNetManagerI _initialBayesNet,
                Settings _processData)
         throws java.lang.Exception
Method Detail

suggestBayesNetChange

public abstract BayesNetChangeI suggestBayesNetChange(BayesNetManagerI _bayesNetManager)
                                               throws java.lang.Exception
Specified by:
suggestBayesNetChange in interface ProposerI
Returns:
Returns a BayesNetChange that a proposer computes based on its algorithm.
Throws:
java.lang.Exception

updateProcessData

public void updateProcessData(Settings _processData)
                       throws java.lang.Exception
Description copied from interface: ProposerI
For future use. Updates whatever setting within processData that is being changed in the particular proposer implementation.

Specified by:
updateProcessData in interface ProposerI
Parameters:
_processData - The data to be exchanged.
Throws:
java.lang.Exception

provideCollectedStatistics

public java.lang.StringBuffer provideCollectedStatistics()
Specified by:
provideCollectedStatistics in interface ProposerI
Returns:
Returns the statistics about the particular proposer implementation.