Hidden Markov model

In probability theory, a hidden Markov model (HMM) is a Markov model in which the observations are dependent on a latent (or hidden) Markov process (referred to as X ).

Uses your system voice; voice and rate in settings.

Snapshot

≈ 6 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In probability theory, a hidden Markov model (HMM) is a Markov model in which the observations are dependent on a latent (or hidden) Markov process (referred to as X ). An HMM requires that there be an observable process Y whose outcomes depend on the outcomes of X in a known way. Since X cannot be observed directly, the goal is to learn about state of X by observing Y . By definition of being a Markov model, an HMM has an additional requirement that the outcome of Y at time t = t_0 must be "influenced" exclusively by the outcome of X at t = t_0 and that the outcomes of X and Y at t must be conditionally independent of Y at t=t_0 given X at time t = t_0 .

Estimation of the parameters in an HMM can be performed using maximum likelihood estimation. For linear chain HMMs, the Baum–Welch algorithm can be used to estimate parameters.

Hidden Markov models are known for their applications to thermodynamics, statistical mechanics, physics, chemistry, economics, finance, signal processing, information theory, pattern recognition—such as speech recognition, handwriting recognition, gesture recognition, part-of-speech tagging, musical score following, partial discharges and bioinformatics. \operatorname{\mathbf{P}}\bigl(Y_n \in A\ \bigl|\ X_1=x_1,\ldots,X_n=x_n\bigr)=\operatorname{\mathbf{P}}\bigl(Y_n \in A\ \bigl|\ X_n=x_n\bigr) , for every n\geq 1 , x_1,\ldots, x_n , and every Borel set A . Let X_t and Y_t be continuous-time stochastic processes. The pair (X_t,Y_t) is a hidden Markov model if X_t is a Markov process whose behavior is not directly observable ("hidden"); \operatorname{\mathbf{P}}(Y_{t_0} \in A \mid \{X_t \in B_t\}_{ t\leq t_0}) = \operatorname{\mathbf{P}}(Y_{t_0} \in A \mid X_{t_0} \in B_{t_0}) , for every t_0 , every Borel set A , and every family of Borel sets \{B_t\}_{t \leq t_0} .

The states of the process X_n (resp. X_t) are called hidden states, and \operatorname{\mathbf{P}}\bigl(Y_n \in A \mid X_n=x_n\bigr) (resp. \operatorname{\mathbf{P}}\bigl(Y_t \in A \mid X_t \in B_t\bigr)) is called emission probability or output probability. states = ("Rainy", "Sunny") observations = ("walk", "shop", "clean") start_probability = {"Rainy": 0.6, "Sunny": 0.4} transition_probability = { "Rainy": {"Rainy": 0.7, "Sunny": 0.3}, "Sunny": {"Rainy": 0.4, "Sunny": 0.6}, } emission_probability = { "Rainy": {"walk": 0.1, "shop": 0.4, "clean": 0.5}, "Sunny": {"walk": 0.6, "shop": 0.3, "clean": 0.1}, } In this piece of code, start_probability represents Alice's belief about which state the HMM is in when Bob first calls her (all she knows is that it tends to be rainy on average).

The particular probability distribution used here is not the equilibrium one, which is (given the transition probabilities) approximately {'Rainy': 0.57, 'Sunny': 0.43} . The transition_probability represents the change of the weather in the underlying Markov chain. In this example, there is only a 30% chance that tomorrow will be sunny if today is rainy.

The emission_probability represents how likely Bob is to perform a certain activity on each day. If it is rainy, there is a 50% chance that he is cleaning his apartment; if it is sunny, there is a 60% chance that he is outside for a walk. A similar example is further elaborated in the Viterbi algorithm page.

In addition, for each of the possible states, there is a set of emission probabilities governing the distribution of the observed variable at a particular time given the state of the hidden variable at that time. The size of this set depends on the nature of the observed variable.

For example, if the observed variable is discrete with possible values, governed by a categorical distribution, there will be separate parameters, for a total of emission parameters over all hidden states. On the other hand, if the observed variable is an -dimensional vector distributed according to an arbitrary multivariate Gaussian distribution, there will be parameters controlling the means and {M(M+1)} / 2 parameters controlling the covariance matrix, for a total of N \left(M + {M(M+1)} / {2}\right) = {NM(M+3)} / 2 = O(NM^2) emission parameters.

(In such a case, unless the value of is small, it may be more practical to restrict the nature of the covariances between individual elements of the observation vector, e.g. by assuming that the elements are independent of each other, or less restrictively, are independent of all but a fixed number of adjacent elements.) Y=y(0), y(1),\dots,y(L-1), of length L is given by P(Y)=\sum_{X}P(Y\mid X)P(X), where the sum runs over all possible hidden-node sequences X=x(0), x(1), \dots, x(L-1).

Applying the principle of dynamic programming, this problem, too, can be handled efficiently using the forward algorithm. Given a Markov transition matrix and an invariant distribution on the states, a probability measure can be imposed on the set of subshifts.

For example, consider the Markov chain given on the right on the states A, B_1, B_2 , with invariant distribution \pi = (2/7, 4/7, 1/7) . By ignoring the distinction between B_1, B_2 , this space of subshifts is projected on A, B_1, B_2 into another space of subshifts on A, B , and this projection also projects the probability measure down to a probability measure on the subshifts on A, B . The curious thing is that the probability measure on the subshifts on A, B is not created by a Markov chain on A, B , not even multiple orders.

Intuitively, this is because if one observes a long sequence of B^n , then one would become increasingly sure that the \Pr(A \mid B^n) \to \frac 23 , meaning that the observable part of the system can be affected by something infinitely in the past. Conversely, there exists a space of subshifts on 6 symbols, projected to subshifts on 2 symbols, such that any Markov measure on the smaller subshift has a preimage measure that is not Markov of any order (example 2.6 ).

Text derived from https://en.wikipedia.org/w/index.php?oldid=1369030736 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

24 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.