ostore.oil
Class HMMBuilder

java.lang.Object
  |
  +--ostore.oil.HMMStage
        |
        +--ostore.oil.HMMBuilder
All Implemented Interfaces:
EventHandlerIF

public class HMMBuilder
extends HMMStage

A stage which automatically fits a Hidden Markov Model to a monitored event stream. This class extends HMMStage, adding support for Builder-specific config tags and ipmlementing the handleEvent method.

Version:
$Id: HMMBuilder.java,v 1.9 2002/07/22 20:54:53 srhea Exp $
Author:
Dennis Geels
See Also:
HMM

Nested Class Summary
 
Nested classes inherited from class ostore.oil.HMMStage
HMMStage.InvalidTypeException, HMMStage.UnsupportedConfigurationException
 
Field Summary
protected  boolean emit_deltas
          true iff this Builder should publish Deltas for its Model whenever the model parameters are recalculated.
protected  int num_observed
          The total number of observations so far.
protected  int recalculation_period
          The number of events to observe before recalculating model parameters.
protected  String snapshot_name
          The name of the snapshot file to write, if write_snapshots == true.
protected  boolean write_snapshots
          true iff this stage should write out snapshots of its Model every time it recalculates its parameters.
 
Fields inherited from class ostore.oil.HMMStage
accessor, class_tag, classifier, model, name, observed_type, QueueElementIF_class, QuickSerializable_class
 
Constructor Summary
HMMBuilder()
           
 
Method Summary
 void handleEvent(QueueElementIF elem)
          Processes the monitored event stream and handles RebuildSignals.
 void init(ConfigDataIF config)
          Initializes this HMMBuilder using the configuration parameters.
 
Methods inherited from class ostore.oil.HMMStage
destroy, handleEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

recalculation_period

protected int recalculation_period
The number of events to observe before recalculating model parameters. If 0, recalculate only when a RebuildSignal is received.


write_snapshots

protected boolean write_snapshots
true iff this stage should write out snapshots of its Model every time it recalculates its parameters.


snapshot_name

protected String snapshot_name
The name of the snapshot file to write, if write_snapshots == true. Otherwise this parameter is ignored.


emit_deltas

protected boolean emit_deltas
true iff this Builder should publish Deltas for its Model whenever the model parameters are recalculated.


num_observed

protected int num_observed
The total number of observations so far.

Constructor Detail

HMMBuilder

public HMMBuilder()
Method Detail

handleEvent

public void handleEvent(QueueElementIF elem)
                 throws UnknownEventException
Processes the monitored event stream and handles RebuildSignals.

Parameters:
elem - Either an event to monitor or a Signal.RebuildSignal.
Throws:
UnknownEventException - if elem is neither of the expected event types.

init

public void init(ConfigDataIF config)
          throws Exception
Initializes this HMMBuilder using the configuration parameters.

Specified by:
init in interface EventHandlerIF
Overrides:
init in class HMMStage
Throws:
InvalidConfigFileException - if the ConfigDataIF contains an invalid parameter or does not contain a required field.
InvalidTypeException - if a parameter specifies a Class or Field which does not implement the proper java interface.
Exception
See Also:
HMMStage.init(seda.sandStorm.api.ConfigDataIF)