We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technology expertise.
Suppose we observe the outputs from a fair (state 1) and unfair (state 2) coin:
Find the most likely sequence of coin changes from the observations:
Scope (7)With list input, FindHiddenMarkovStates outputs the hidden state sequence as a list:
For TemporalData input, the output is a time series object of the same type as the input:
FindHiddenMarkovStates maps over individual paths:
Each hidden state path is found individually:
Decode state sequence when some emissions are unknown:
Decode the hidden states for the given sequence of observations:
Use Viterbi decoding to find the most probable sequence:
Use posterior decoding to find the sequence of individually most-likely states:
Define a hidden Markov process with continuous emissions:
Simulate the process, including values of the hidden states:
Find the most likely state sequence for the given emissions:
Compare the decoded states to the actual states:
Find the most likely state sequence given multivariate emissions:
Decode the most likely state sequence:
Compare the result against the actual state sequence:
Define joint log‐likelihood of hidden states and emissions:
Viterbi‐decoded state sequence has equal or higher log‐likelihood than the actual sequence:
Decode state sequence for a process with silent states:
Find the most likely state sequence:
Highlight emitting states in the sequence:
Applications (3)An occasionally dishonest casino offers a coin betting game and uses an unfair practice of using a biased coin for which the head is three times more likely than the tail. The casino dealer is known to secretly switch between the fair and biased coins with probability 10%:
The probabilities of getting heads or tails:
The resulting hidden Markov process, assuming equal probabilities of starting with either coin:
Given a sequence of tossings, guess on which occasions the dealer used the biased coin:
Visualize emissions and use color coding to show the hidden state sequence:
Define the process and decode hidden states underlying the given observations:
Group time‐annotated emissions according to the decoded state value:
A toy robot travels on a 4×4 grid with walls represented by gray squares and cannot leave the map. The robot chooses randomly among four directions and attempts the move. If the move is disallowed it remains on the previous square:
Find tiles the robot can visit:
Encode the robot's move in a graph and overlay it on the map:
Build the DiscreteMarkovProcess for the underlying hidden states:
The robot's optical sensor is rated 90% accurate, uniformly picking from used colors when faulting:
Model readings of the robot's optical sensor by hidden Markov process:
Given a sequence of sensor readings, use the model to find the robot's most likely movements on the map:
Visualize paths decoded using "ViterbiDecoding" and "PosteriorDecoding" criteria:
Properties & Relations (3)"ViterbiDecoding" maximizes the joint log-likelihood of the states and emissions:
Define the joint state and emission log-likelihood:
Compute all possible state paths:
Compute the joint log-likelihood for all the path combinations:
FindHiddenMarkovStates returns the state path with the maximum joint log-likelihood:
"PosteriorDecoding" finds the sequence of most likely states at each time individually:
Define distributions for hidden state values at times 0, 1, and 2:
Define distributions for emissions given the value of the hidden state:
Conditional emissions at times 0, 1, and 2 are independent of each other:
Define emissions at times 0, 1, and 2 as function of state values and conditional emission values:
Define the condition that emission random variables are equal to the observed values:
Find the sequence of the most probable states for each individual time instance:
Compare with the result of posterior decoding:
FindHiddenMarkovStates returns hard output, i.e. only one path:
In this case there are two equally probable paths:
A complete search shows that these are the only two:
Possible Issues (2)FindHiddenMarkovStates returns unevaluated if a path is inconsistent with the given HMM:
The likelihood of this emission sequence equals zero:
"PosteriorDecoding" may result in state sequences inconsistent with state topology:
The following sequence of emissions is consistent with the hidden Markov process:
Find hidden states using posterior decoding:
The state sequence found is inconsistent with the model for state transitions:
Wolfram Research (2014), FindHiddenMarkovStates, Wolfram Language function, https://reference.wolfram.com/language/ref/FindHiddenMarkovStates.html. TextWolfram Research (2014), FindHiddenMarkovStates, Wolfram Language function, https://reference.wolfram.com/language/ref/FindHiddenMarkovStates.html.
CMSWolfram Language. 2014. "FindHiddenMarkovStates." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindHiddenMarkovStates.html.
APAWolfram Language. (2014). FindHiddenMarkovStates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindHiddenMarkovStates.html
BibTeX@misc{reference.wolfram_2025_findhiddenmarkovstates, author="Wolfram Research", title="{FindHiddenMarkovStates}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/FindHiddenMarkovStates.html}", note=[Accessed: 11-July-2025 ]}
BibLaTeX@online{reference.wolfram_2025_findhiddenmarkovstates, organization={Wolfram Research}, title={FindHiddenMarkovStates}, year={2014}, url={https://reference.wolfram.com/language/ref/FindHiddenMarkovStates.html}, note=[Accessed: 11-July-2025 ]}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4