Package Bio :: Package HMM :: Module DynamicProgramming :: Class ScaledDPAlgorithms
[show private | hide private]
[frames | no frames]

Class ScaledDPAlgorithms

AbstractDPAlgorithms --+
                       |
                      ScaledDPAlgorithms


Implement forward and backward algorithms using a rescaling approach.

This scales the f and b variables, so that they remain within a manageable numerical interval during calculations. This approach is described in Durbin et al. on p 78.

This approach is a little more straightfoward then log transformation but may still give underflow errors for some types of models. In these cases, the LogDPAlgorithms class should be used.
Method Summary
  __init__(self, markov_model, sequence)
Initialize the scaled approach to calculating probabilities.
    Inherited from AbstractDPAlgorithms
  backward_algorithm(self)
Calculate sequence probability using the backward algorithm.
  forward_algorithm(self)
Calculate sequence probability using the forward algorithm.

Method Details

__init__(self, markov_model, sequence)
(Constructor)

Initialize the scaled approach to calculating probabilities. Arguments:

o markov_model -- The current Markov model we are working with.

o sequence -- A TrainingSequence object that must have a set of emissions to work with.
Overrides:
Bio.HMM.DynamicProgramming.AbstractDPAlgorithms.__init__

Generated by Epydoc 2.1 on Sat Jul 16 15:48:59 2005 http://epydoc.sf.net