LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::hiddenMarkovModel Class Reference

Hidden Markov Model (HMM) class. More...

#include <ltiHiddenMarkovModel.h>

Inheritance diagram for lti::hiddenMarkovModel:
Inheritance graph
[legend]
Collaboration diagram for lti::hiddenMarkovModel:
Collaboration graph
[legend]

List of all members.

Classes

class  singleDensity
 This class represents a single multivariate (ie multidimensional ) score density function within a state of a hidden markov model. More...

Public Types

enum  scoreType
typedef std::vector
< singleDensity
mixtureDensity
typedef std::vector
< mixtureDensity
stateList

Public Member Functions

 hiddenMarkovModel ()
 hiddenMarkovModel (const hiddenMarkovModel &other)
virtual ~hiddenMarkovModel ()
hiddenMarkovModelcopy (const hiddenMarkovModel &other)
hiddenMarkovModeloperator= (const hiddenMarkovModel &other)
const char * getTypeName () const
int getNumberOfStates () const
virtual bool write (ioHandler &handler, const bool complete=true) const
virtual bool read (ioHandler &handler, const bool complete=true)

Public Attributes

User defined

These members may (but don't have to) be specified by the user



std::string name
dvector featureWeights
double emissionScoreWeight
Generated by hmmTrainer

These members are usually estimated over a given data set by an automatic training algorithm (see hmmTrainer)



scoreType scoreFunction
stateList states
int featureDimension
dvector initialScore
dmatrix transitionScore

Static Public Attributes

static const double INFINITE_NUMBER

Detailed Description

Hidden Markov Model (HMM) class.

A HMM can be created using the class hmmTrainer, which estimates the HMM parameters A, B, Pi. These stand for the transitions the emissions in the model states, and the initial probabilities.

For an introduction see: L. Rabiner and B.-H. Juang, "An introduction to hidden markov models", IEEE ASSP Magazine no.1, vol.3, pp4-16, 1986.

For computational efficiency probabilities p are not explicitly computed but represented by scores (~ -ln(p)). Note that a high score corresponds to a low probability, i.e. it rather resembles a cost.


Member Typedef Documentation

A mixture density.

Composed of single densities to represent the distribution within one state

States of the model, where each state contains a mixture density.


Member Enumeration Documentation

Density type used.

Currently gauss or laplace are available.


Constructor & Destructor Documentation

lti::hiddenMarkovModel::hiddenMarkovModel (  ) 

default constructor

lti::hiddenMarkovModel::hiddenMarkovModel ( const hiddenMarkovModel other  ) 

copy constructor

Parameters:
other the hiddenMarkovModel to be copied
virtual lti::hiddenMarkovModel::~hiddenMarkovModel (  )  [virtual]

destructor


Member Function Documentation

hiddenMarkovModel& lti::hiddenMarkovModel::copy ( const hiddenMarkovModel other  ) 

copy data of "other" hiddenMarkovModel.

Please note that the status string will _NOT_ be copied!

Reimplemented from lti::ioObject.

int lti::hiddenMarkovModel::getNumberOfStates (  )  const

Returns the number of states of this model.

const char* lti::hiddenMarkovModel::getTypeName (  )  const [virtual]

returns name of this type

Reimplemented from lti::ioObject.

hiddenMarkovModel& lti::hiddenMarkovModel::operator= ( const hiddenMarkovModel other  ) 

assigment operator (alias for copy(other)).

Parameters:
other the hiddenMarkovModel to be copied
Returns:
a reference to the actual hiddenMarkovModel

Reimplemented from lti::ioObject.

virtual bool lti::hiddenMarkovModel::read ( ioHandler handler,
const bool  complete = true 
) [virtual]

read the parameters from the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::ioObject.

virtual bool lti::hiddenMarkovModel::write ( ioHandler handler,
const bool  complete = true 
) const [virtual]

write the parameters in the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::ioObject.


Member Data Documentation

Relative weight of the emission scores compared to the initial and transition score.

Can be used to compensate the magnitude difference between those.

Use a value >1.0, to emphasize the emission or a value <1.0 to put more weight into the transitions. Default value is 1.0

Number of dimensions for an observation.

Absolute weight of each feature (dimension).

Default is a vector of 1.0 for all features to indicate equal importance (weights are ignored if number of dimensions differs from featureDimension).

This number is considered to be the "impossible" score (score equivalent to a probability of 0.0).

Score for each state being the starting state.

This is the HMM parameter called Pi

Name of the model.

Can be used to identify a model by a string.

Specifies the score function to be used.

default: laplaceScore

List of states of the model s_i.

Generally the number of states is denoted N. The states contain the emission functions b_i, known as the HMM parameter called B

Score for each transition.

TransitionScore[a][b] is the score for a transition from state a to b. This is the HMM parameter called A


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:28:24 2010 for LTI-Lib by Doxygen 1.6.1