be.ac.ulg.montefiore.run.jahmm
Class ViterbiCalculator

java.lang.Object
  extended by be.ac.ulg.montefiore.run.jahmm.ViterbiCalculator

public class ViterbiCalculator
extends java.lang.Object

This class can be used to compute the most probable state sequence matching a given observation sequence (given an HMM).


Constructor Summary
ViterbiCalculator(java.util.List<? extends O> oseq, Hmm<O> hmm)
          Computes the most likely state sequence matching an observation sequence given an HMM.
 
Method Summary
 double lnProbability()
          Returns the neperian logarithm of the probability of the given observation sequence on the most likely state sequence of the given HMM.
 int[] stateSequence()
          Returns a (clone of) the array containing the computed most likely state sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViterbiCalculator

public ViterbiCalculator(java.util.List<? extends O> oseq,
                         Hmm<O> hmm)
Computes the most likely state sequence matching an observation sequence given an HMM.

Parameters:
hmm - A Hidden Markov Model;
oseq - An observations sequence.
Method Detail

lnProbability

public double lnProbability()
Returns the neperian logarithm of the probability of the given observation sequence on the most likely state sequence of the given HMM.

Returns:
ln(P[O,S|H]) where O is the given observation sequence, H the given HMM and S the most likely state sequence of this observation sequence given this HMM.

stateSequence

public int[] stateSequence()
Returns a (clone of) the array containing the computed most likely state sequence.

Returns:
The state sequence; the i-th value of the array is the index of the i-th state of the state sequence.


Copyright © 2004,2005 Jean-Marc François.