ToPS
Public Member Functions
tops::DecodableModel Class Reference

Interface defining probabilistic model with the viterbi, forward and backward algorithm. More...

#include <DecodableModel.hpp>

Inheritance diagram for tops::DecodableModel:
tops::ProbabilisticModel tops::GeneralizedHiddenMarkovModel tops::HiddenMarkovModel

List of all members.

Public Member Functions

virtual double evaluate (const Sequence &s, unsigned int begin, unsigned int end) const
 Calculates the sequence likelihood given this model.
virtual double forward (const Sequence &s, Matrix &alpha) const =0
 Forward algorithm.
virtual double backward (const Sequence &s, Matrix &beta) const =0
 Backward algorithm.
virtual double viterbi (const Sequence &s, Sequence &path, Matrix &gamma) const =0
 Viterbi algorithm.
virtual void choosePath (const Sequence &s, Sequence &path)
 Choose a path given a sequence.
virtual void posteriorProbabilities (const Sequence &s, Matrix &probabilities) const
 Posterior Probabilities: P(yi=k|x)
virtual void posteriorProbabilities (const Sequence &s, SparseMatrixPtr probabilities) const
 Posterior Probabilities: P(yi=k|x)
virtual void posteriorDecoding (const Sequence &s, Sequence &path, Matrix &probabilities) const
 Posterior Decoding: ^yi = argmax_k P(yi=k|x)
virtual Sequence & chooseObservation (Sequence &h, int i, int state) const =0
 Choose the observation given a state.
virtual int chooseState (int state) const =0
 Choose a state.
virtual int chooseFirstState () const =0
 Choose the initial state.
virtual std::string getStateName (int state) const =0
 Get state name.
virtual AlphabetPtr getStateNames () const =0
 Get the state names.

Detailed Description

Interface defining probabilistic model with the viterbi, forward and backward algorithm.

Definition at line 38 of file DecodableModel.hpp.


Member Function Documentation

virtual Sequence& tops::DecodableModel::chooseObservation ( Sequence &  h,
int  i,
int  state 
) const [pure virtual]

Choose the observation given a state.

Parameters:
his the history

Implemented in tops::GeneralizedHiddenMarkovModel, and tops::HiddenMarkovModel.


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