|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.util.StandardStage | +--ostore.introspect.SDMBuilder
Stage that accepts RecordEventReq
s and builds a local model
based on them. Periodically recalculates the local model based on these
timed observations and emits (distpatches)
SemanticDistanceModel.Delta
s when the model is recalculated.
Configuration parameters:
model [string] - the identifier for this model; only model messages targeted at this model will be received. Ommit this to receive all msgs. read_snapshot [string] - load a model from a snapshot file max_relations [int] - max relations to keep per row in model signal [boolean] - recalculate model on RBLD signal period [int] - recalculate model every X milliseconds maxobs [int] - recalculate model after X observations write_snapshot [string] - write snapshot file after recalculating model emit_deltas [boolean] - emit deltas after recalculating model
Based on HMMBuilder
.
SemanticDistanceModel
Nested Class Summary | |
---|---|
static class |
SDMBuilder.InvalidTypeException
An exception thrown when a config file supplies the name of a class or field that does not satisfy type restrictions. |
static class |
SDMBuilder.UnsupportedConfigurationException
An exception thrown when a config file requests an operation (e.g. emit_predictions) that a particular Builder does not
provide. |
Field Summary | |
---|---|
static String |
class_tag
|
static boolean |
DEBUG
|
protected boolean |
emit_deltas
true iff this Builder should publish
Delta s for its Model whenever the model
parameters are recalculated. |
protected String |
ident
The identifier of this model. |
protected SemanticDistanceModel |
model
The learning model to use. |
protected String |
name
Name of stage. |
protected int |
num_observed
The total number of observations so far. |
protected int |
recalculation_maxobs
The number of events to observe before recalculating model parameters. |
protected int |
recalculation_period
The time (ms) between RebuildSignal s are received. |
protected boolean |
recalculation_signal
Recalculate the model when we get a Signal.RBLD
(meaning the machine is "not busy") |
protected Signal |
signal
Signal Handler |
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.util.StandardStage |
---|
classifier, event_types, inb_msg_types, logger, my_node_id, my_sink, outb_msg_types, resender, resender_tokens, serializable_types, sim_running, tag |
Constructor Summary | |
---|---|
SDMBuilder()
|
Method Summary | |
---|---|
void |
handleEvent(QueueElementIF elem)
|
void |
init(ConfigDataIF config)
|
Methods inherited from class ostore.util.StandardStage |
---|
BUG, BUG, BUG, destroy, dispatch, enqueue, handleEvents, now_ms, now_us |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean DEBUG
public static final String class_tag
protected String name
protected String ident
protected int recalculation_period
RebuildSignal
s are received. If 0,
then only recalculate when recalculation_maxobs
outstanding
observations are made.
protected int recalculation_maxobs
RebuildSignal
is received.
protected boolean recalculation_signal
Signal.RBLD
(meaning the machine is "not busy")
protected boolean write_snapshots
true
iff this stage should write out snapshots of its
Model
every time it recalculates its parameters.
protected String snapshot_name
write_snapshots ==
true
. Otherwise this parameter is ignored.
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
protected SemanticDistanceModel model
protected Signal signal
Constructor Detail |
public SDMBuilder()
Method Detail |
public void handleEvent(QueueElementIF elem) throws UnknownEventException
UnknownEventException
public void init(ConfigDataIF config) throws Exception
init
in interface EventHandlerIF
init
in class StandardStage
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |