Implement forward and backward algorithms using a log approach.
This uses the approach of calculating the sum of log probabilities
using a lookup table for common values.
XXX This is not implemented yet!
| Method Summary |
| |
__init__(self,
markov_model,
sequence)
Initialize to calculate foward and backward probabilities. |
| Inherited from AbstractDPAlgorithms |
| |
backward_algorithm(self)
Calculate sequence probability using the backward algorithm. |
| |
forward_algorithm(self)
Calculate sequence probability using the forward algorithm. |
| |
_backward_recursion(self,
cur_state,
sequence_pos,
forward_vars)
Calculate the backward recursion value. |
| |
_foward_recursion(self,
cur_state,
sequence_pos,
forward_vars)
Calculate the forward recursion value. |