be.ac.ulg.montefiore.run.jahmm
Class ForwardBackwardScaledCalculator
java.lang.Object
be.ac.ulg.montefiore.run.jahmm.ForwardBackwardCalculator
be.ac.ulg.montefiore.run.jahmm.ForwardBackwardScaledCalculator
public class ForwardBackwardScaledCalculator
- extends ForwardBackwardCalculator
This class can be used to compute the probability of a given observations
sequence for a given HMM.
This class implements the scaling method explained in Rabiner and
Juang, thus the alphaElement
and
betaElement
return the scaled alpha and
beta elements. The alpha
array must always be computed
because the scaling factors are computed together with it.
For more information on the scaling procedure, read Rabiner and
Juang's Fundamentals of speech recognition (Prentice Hall,
1993).
Method Summary |
protected
|
computeAlpha(Hmm<? super O> hmm,
java.util.List<O> oseq)
|
protected
|
computeBeta(Hmm<? super O> hmm,
java.util.List<O> oseq)
|
double |
lnProbability()
Return the neperian logarithm of the probability of the sequence that
generated this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ForwardBackwardScaledCalculator
public ForwardBackwardScaledCalculator(java.util.List<? extends O> oseq,
Hmm<O> hmm,
java.util.EnumSet<ForwardBackwardCalculator.Computation> flags)
- Computes the probability of occurence of an observation sequence
given a Hidden Markov Model. The algorithms implemented use scaling
to avoid underflows.
- Parameters:
hmm
- A Hidden Markov Model;oseq
- An observations sequence.flags
- How the computation should be done. See the
ForwardBackwardCalculator.Computation
.
The alpha array is always computed.
ForwardBackwardScaledCalculator
public ForwardBackwardScaledCalculator(java.util.List<? extends O> oseq,
Hmm<O> hmm)
- Computes the probability of occurence of an observation sequence
given a Hidden Markov Model. This computation computes the scaled
alpha
array as a side effect.
- See Also:
ForwardBackwardScaledCalculator(List, Hmm, EnumSet)
computeAlpha
protected <O extends Observation> void computeAlpha(Hmm<? super O> hmm,
java.util.List<O> oseq)
- Overrides:
computeAlpha
in class ForwardBackwardCalculator
computeBeta
protected <O extends Observation> void computeBeta(Hmm<? super O> hmm,
java.util.List<O> oseq)
- Overrides:
computeBeta
in class ForwardBackwardCalculator
lnProbability
public double lnProbability()
- Return the neperian logarithm of the probability of the sequence that
generated this object.
- Returns:
- The probability of the sequence of interest's neperian logarithm.
Copyright © 2004,2005
Jean-Marc François.