org.encog.ml.hmm.alog

## Class ForwardBackwardScaledCalculator

- java.lang.Object
- - org.encog.ml.hmm.alog.ForwardBackwardCalculator
  - - org.encog.ml.hmm.alog.ForwardBackwardScaledCalculator

-     public class ForwardBackwardScaledCalculator
      extends ForwardBackwardCalculator

  The forward-backward algorithm is an inference algorithm for hidden Markov models which computes the posterior marginals of all hidden state variables given a sequence of observations. This version makes use of scaling, and will not generate underflows with long sequences.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.encog.ml.hmm.alog.ForwardBackwardCalculator

      `ForwardBackwardCalculator.Computation`

  - ### Field Summary

    - ### Fields inherited from class org.encog.ml.hmm.alog.ForwardBackwardCalculator

      `alpha, beta, probability`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ForwardBackwardScaledCalculator(MLDataSet oseq, HiddenMarkovModel hmm)`
    `ForwardBackwardScaledCalculator(MLDataSet oseq, HiddenMarkovModel hmm, EnumSet<ForwardBackwardCalculator.Computation> flags)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `computeAlpha(HiddenMarkovModel hmm, MLDataSet oseq)` Compute alpha.
    `protected void` | `computeBeta(HiddenMarkovModel hmm, MLDataSet oseq)` Compute the beta step.
    `double` | `lnProbability()`

    - ### Methods inherited from class org.encog.ml.hmm.alog.ForwardBackwardCalculator

      `alphaElement, betaElement, computeAlphaInit, computeAlphaStep, computeBetaStep, probability`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ForwardBackwardScaledCalculator

          public ForwardBackwardScaledCalculator(MLDataSet oseq,
                                         HiddenMarkovModel hmm)

    - #### ForwardBackwardScaledCalculator

          public ForwardBackwardScaledCalculator(MLDataSet oseq,
                                         HiddenMarkovModel hmm,
                                         EnumSet<ForwardBackwardCalculator.Computation> flags)

  - ### Method Detail

    - #### computeAlpha

          protected void computeAlpha(HiddenMarkovModel hmm,
                          MLDataSet oseq)

      Description copied from class: `ForwardBackwardCalculator`
      Compute alpha.
      Overrides:
        `computeAlpha` in class `ForwardBackwardCalculator`
      Parameters:
        `hmm` - The hidden markov model.
        `oseq` - The sequence.

    - #### computeBeta

          protected void computeBeta(HiddenMarkovModel hmm,
                         MLDataSet oseq)

      Description copied from class: `ForwardBackwardCalculator`
      Compute the beta step.
      Overrides:
        `computeBeta` in class `ForwardBackwardCalculator`
      Parameters:
        `hmm` - The hidden markov model.
        `oseq` - The sequence.

    - #### lnProbability

          public double lnProbability()

Copyright © 2014. All Rights Reserved.