ostore.oil
Class HMM.Delta

java.lang.Object
  |
  +--ostore.oil.HMM.Delta
All Implemented Interfaces:
Model.Delta, QueueElementIF, QuickSerializable
Enclosing class:
HMM

public static class HMM.Delta
extends Object
implements Model.Delta

A HMM.Delta object contains a diff of the sufficient statistics for an HMM.

Version:
$Id: HMM.java,v 1.31 2002/07/20 19:38:03 srhea Exp $
Author:
Dennis Geels

Field Summary
 Matrix emissions
          Estimated count of state-output emissions.
 Array marginals
          Estimated marginal counts for each state.
 QSVector states
          The set of states referenced in the sufficient statistics.
 Matrix transitions
          Estimated count of state-state transitions.
 
Constructor Summary
HMM.Delta(InputBuffer buffer)
          Constructs a Delta from its serialized form.
HMM.Delta(QSVector states, Array marginals, Matrix transitions, Matrix emissions)
          Constructs a Delta with the specified HMM data.
 
Method Summary
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 Model.Delta sum(Model.Delta other)
          Produce the sum of this and another Delta.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

states

public QSVector states
The set of states referenced in the sufficient statistics. The order is unimportant.


marginals

public Array marginals
Estimated marginal counts for each state.


transitions

public Matrix transitions
Estimated count of state-state transitions.


emissions

public Matrix emissions
Estimated count of state-output emissions.

Constructor Detail

HMM.Delta

public HMM.Delta(QSVector states,
                 Array marginals,
                 Matrix transitions,
                 Matrix emissions)
Constructs a Delta with the specified HMM data. The statistics should only contain entries for the specified states.

Parameters:
states - The set of states contained in this Delta
marginals - A QuickSerializable->double mapping from states to their marginal sufficient statistic.
transitions - A QuickSerializable->Array mapping from states to their transition sufficient statistics.
emissions - A QuickSerializable->Array mapping from states to their emission sufficient statistics.

HMM.Delta

public HMM.Delta(InputBuffer buffer)
          throws QSException
Constructs a Delta from its serialized form.

Method Detail

sum

public Model.Delta sum(Model.Delta other)
Description copied from interface: Model.Delta
Produce the sum of this and another Delta.

Specified by:
sum in interface Model.Delta
Parameters:
other - The other Delta.
Returns:
a new Delta, constructed such that applying it to a Model produces an equivalent Model to that produced by adding first this, then other.

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Parameters:
buffer - the output buffer to add the object to