latest version v1.9 - last update 10 Apr 2010 |
Hidden Markov Model (HMM) trainer. More...
#include <ltiHmmTrainer.h>
Classes | |
class | parameters |
the parameters for the class hmmTrainer More... | |
Public Member Functions | |
hmmTrainer () | |
hmmTrainer (const hmmTrainer &other) | |
virtual | ~hmmTrainer () |
virtual const char * | getTypeName () const |
void | reset () |
void | consider (const sequence< dvector > &theSeq) |
void | consider (const std::vector< sequence< dvector > > &theSequences) |
void | apply (hiddenMarkovModel &model) |
dvector | getScoreProgressSequence () |
hmmTrainer & | copy (const hmmTrainer &other) |
hmmTrainer & | operator= (const hmmTrainer &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Hidden Markov Model (HMM) trainer.
This class creates a hiddenMarkovModel from a given training set of feature vector sequences.
By default a bakis-topology is chosen (0-1-2 transitions), but this can be changed by redefining minJump and maxJump.
The Viterbi training algorithm, aka segmental K-means, and a mixture density estimator are used to determine the HMM parameters, starting from the user-defined parameters.
See: B.-H. Juang and L. Rabiner, "The segmentation K-means algorithm for estimating %parameters of hidden markov models", IEEE ASSP Magazine, no.9, vol.38, pp.1639-1641,1990.
Note: 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 actually resembles a cost.
lti::hmmTrainer::hmmTrainer | ( | ) |
default constructor
lti::hmmTrainer::hmmTrainer | ( | const hmmTrainer & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::hmmTrainer::~hmmTrainer | ( | ) | [virtual] |
destructor
void lti::hmmTrainer::apply | ( | hiddenMarkovModel & | model | ) |
Generate hiddenMarkovModel from the data in the internal data store, that has been filled with the consider() members so far.
virtual functor* lti::hmmTrainer::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
Consider multiple sequences for computing the hidden markov model.
The sequences are added to an internal data store.
hmmTrainer& lti::hmmTrainer::copy | ( | const hmmTrainer & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
const parameters& lti::hmmTrainer::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::functor.
dvector lti::hmmTrainer::getScoreProgressSequence | ( | ) | [inline] |
virtual const char* lti::hmmTrainer::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("hmmTrainer")
Reimplemented from lti::functor.
hmmTrainer& lti::hmmTrainer::operator= | ( | const hmmTrainer & | other | ) |
void lti::hmmTrainer::reset | ( | ) |
Discard sequences considered so far.