Class Viterbi


  • public class Viterbi
    extends Object
    The Viterbi algorithm is a dynamic programming algorithm for finding the most likely sequence of hidden states - called the Viterbi path - that results in a sequence of observed events, especially in the context of Markov information sources and hidden Markov models.
    See Also:
    • Rabiner, L.R. "A tutorial on hidden Markov models and selected applications in speech recognition," Proceedings of the IEEE. Volume 77, Issue 2, 257 - 286. Feb 1989.
    • W. Zucchini and I. L. MacDonald, "Hidden Markov Models for Time Series: An Introduction Using R," Boca Raton, Florida, CRC Press, 2009.
    • Wikipedia: Viterbi algorithm
    • "ref/hmm/viterbi.pdf"
    • Constructor Detail

      • Viterbi

        public Viterbi​(HiddenMarkovModel model)
        Constructs an Viterbi algorithm for an HMM.
        Parameters:
        model - the underlying hidden Markov model
    • Method Detail

      • getViterbiStates

        public int[] getViterbiStates​(double[] observations)
        Gets the most likely sequence of states using Viterbi algorithm (global decoding), given the observations and the underlying hidden Markov model.
        Parameters:
        observations - the observations
        Returns:
        the most likely sequence of states