# Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.
BUILT-IN WOLFRAM LANGUAGE SYMBOL

# FindHiddenMarkovStates

FindHiddenMarkovStates[data,hmm]
finds the most likely hidden states of the HiddenMarkovProcess hmm corresponding to the emissions data.

FindHiddenMarkovStates[data,hmm,crit]
uses the given criterion crit to find the hidden states.

## DetailsDetails

• FindHiddenMarkovStates is also known as hidden state decoding and Viterbi decoding.
• The emissions data can be either a list or a TemporalData object.
• FindHiddenMarkovStates returns the hidden state path in the same form as the emissions data. If there are multiple paths in data, there will be multiple state paths returned.
• Possible values for criterion crit include:
•  "ViterbiDecoding" maximize likelihood for hidden state sequence (default) "PosteriorDecoding" maximize likelihood for hidden state at each time
• Given an emission sequence , maximizes the probability of a state sequence as a whole , whereas maximizes the probability of a state value at each time .

## ExamplesExamplesopen allclose all

### Basic Examples  (1)Basic Examples  (1)

Suppose we observe the outputs from a fair (state 1) and unfair (state 2) coin:

 In[1]:=
 In[2]:=

Find the most likely sequence of coin changes from the observations:

 In[3]:=
 Out[3]=
 In[4]:=
 Out[4]=