Class Viterbi2

java.lang.Object
  extended by Viterbi2

public class Viterbi2
extends java.lang.Object

This is a template for a Viterbi2 class, which can be used to compute most likely sequences using a second-order HMM. Fill in code for the constructor and mostLikelySequence method.


Constructor Summary
Viterbi2(Hmm2 hmm)
           
 
Method Summary
 int[] mostLikelySequence(int[] output)
          Returns the most likely state sequence for the given output sequence, i.e., the state sequence of highest conditional probability given the output sequence, according to the second-order HMM that was provided to the constructor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Viterbi2

public Viterbi2(Hmm2 hmm)
Method Detail

mostLikelySequence

public int[] mostLikelySequence(int[] output)
Returns the most likely state sequence for the given output sequence, i.e., the state sequence of highest conditional probability given the output sequence, according to the second-order HMM that was provided to the constructor. The returned state sequence should have the same number of elements as the given output sequence.