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.6 2001/11/30 18:26:18 geels Exp $
- Author:
- Dennis Geels
- See Also:
HMM
Field Summary |
protected boolean |
emit_deltas
true iff this Builder should publish
Delta s 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. |
Method Summary |
void |
handleEvent(QueueElementIF elem)
Processes the monitored event stream and handles
RebuildSignal s. |
void |
init(ConfigDataIF config)
Initializes this HMMBuilder using the configuration
parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Delta
s for its Model
whenever the model
parameters are recalculated.
num_observed
protected int num_observed
- The total number of observations so far.
HMMBuilder
public HMMBuilder()
handleEvent
public void handleEvent(QueueElementIF elem)
throws UnknownEventException
- Processes the monitored event stream and handles
RebuildSignal
s.
- 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.
- 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.- See Also:
HMMStage.init(mdw.sandStorm.api.ConfigDataIF)