Group HMM Algorithms
Algorithms on HmmGraph objects.
Algorithms on HmmGraph objects.
Grouped Function Overview

TCargo backwardAlgorithm(hmm, seq);
Given a Hidden Markov Model hmm, the backward algorithm computes the probability of the sequence seq. 
TCargo forwardAlgorithm(hmm, seq);
Given a Hidden Markov Model hmm, the forward algorithm computes the probability of the sequence seq. 
void generateSequence(hmm, seq, states, numSeq, maxLen);
Generates random state and alphabet sequence of a given HMM. 
TCargo viterbiAlgorithm(path, hmm, seq);
Implements the Viterbi algorithm for Hidden Markov Models.
Grouped Functions Detail
TCargo backwardAlgorithm(hmm, seq);
 Defined in
 <seqan/graph_algorithms.h>
Given a Hidden Markov Model hmm, the backward algorithm computes the probability of the sequence
seq.
Parameters
hmm

The HmmGraph with the HMM to use. 

seq

Input sequence to use in the backward algorithm. 
Returns
TCargo 
The probability of the sequence seq. TProbability is the type parameter TCargo of the type of hmm. 

See the Wikipedia article on the Forwardbackward algorithm for an introduction to the algorithm itself.
Data Races
Thread safety unknown!
See Also
TCargo forwardAlgorithm(hmm, seq);
 Defined in
 <seqan/graph_algorithms.h>
Given a Hidden Markov Model hmm, the forward algorithm computes the probability of the sequence
seq.
Parameters
hmm

The HmmGraph with the HMM to use. 

seq

Input sequence to use in the forward algorithm. 
Returns
TProbability 
The probability of the sequence seq. TProbability is the type parameter TCargo of the type of hmm. 

Remarks
See the Wikipedia article on the Forward algorithm for an introduction to the algorithm itself.
Data Races
Thread safety unknown!
See Also
void generateSequence(hmm, seq, states, numSeq, maxLen);
 Defined in
 <seqan/graph_algorithms.h>
Generates random state and alphabet sequence of a given HMM.
Parameters
seq

A StringSet of alphabet sequences. 

states

A ContainerConcept object of state sequences. 
hmm

The HmmGraph to use. 
numSeq

The number of sequences to generate. 
maxLen

The maximum length of the sequences. The sequences might be shorter if the ends tate is reached before maxLen. 
Remarks
Because of silent states, generated alphabet and state sequences might have different lengths.
Data Races
Thread safety unknown!
TCargo viterbiAlgorithm(path, hmm, seq);
 Defined in
 <seqan/graph_algorithms.h>
Implements the Viterbi algorithm for Hidden Markov Models.
Parameters
path

The state path; String of vertex descriptors. 

hmm

The HmmGraph to use. 
seq

Input sequence. 
Returns
TCargo 
Probability of the path, the type parameter TCargo from type of hmm. 

The Viterbi algorithm computes the most likely sequence of hidden states of the Hidden Markov Model hmm given the sequence seq using dynamic programming. The result is the most likely sequence of hidden states and returned in path.
Remarks
See the Wikipedia article on the Viterbi algorithm for an introduction to the algorithm itself.
Data Races
Thread safety unknown!