Search code examples
javahidden-markov-models

jahmm-how to generate output states for a given sequence using a trained HMM


I used Jahmm to train an HMM using my input sequence. After the training is complete, I have learnt HMM model and my initial input sequence. How do I generate the output states for the input sequence using the learnt HMM model?


Solution

  • I assume you are looking for the most likely state sequence for a given input sequence. This can be retrieved using ViterbiCalculator.stateSequence() in the jahmm package, see the Javadoc.