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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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
serialize
d form.
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
- Following copied from interface:
ostore.oil.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
. - Throws:
IllegalArgumentException
- if other
is not
an instance of a compatible Delta
subclass.
serialize
public void serialize(OutputBuffer buffer)
- Description copied from interface:
QuickSerializable
- Add the object to the
buffer
.
- Specified by:
serialize
in interface QuickSerializable
- Following copied from interface:
ostore.util.QuickSerializable
- Parameters:
buffer
- the output buffer to add the object to