Wolfram Language & System 10.0 (2014)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


represents a discrete-time, finite-state hidden Markov process with transition matrix m, emission matrix em, and initial hidden state .

represents a hidden Markov process with emission distributions .

represents a hidden Markov process with initial hidden state probability vector .


  • HiddenMarkovProcess is also known as a hidden Markov model or HMM.
  • HiddenMarkovProcess is a discrete-time and discrete-state random process.
  • A hidden Markov process has DiscreteMarkovProcess[p0,m] as an underlying hidden state transition process. The values observed from a hidden Markov process, called emissions, are random and follow emission distributions at state i. Emissions produced while visiting given sequence of states are independent.
  • The hidden states of HiddenMarkovProcess are integers between 1 and , where is the length of the transition matrix m.
  • The transition matrix m specifies conditional hidden state transition probabilities mi,jProbability[x[k+1]jx[k]i], where is the hidden state of the process at time k.
  • The emission matrix em specifies the probabilities for emissions at a given hidden state emi,rProbability[y[k]rx[k]i], where is the hidden state and is the emission at time k.
  • The emission distributions must be all univariate or all multivariate, all discrete or all continuous.
  • The emission distribution specifies that given that .
  • A silent state that produces no emissions is represented by a row of zeroes in the case of an emission matrix, or by None for general emissions. Each silent state must have a path to an emitting state.
  • For a hidden Markov process proc with silent states, HiddenMarkovProcess[proc] gives the effective process with silent states removed.
  • EstimatedProcess[data,HiddenMarkovProcess[n,edist]] can be used to estimate an n state process with emission distributions in the family specified by edist.
  • The following special edist templates can be used:
  • ss discrete emissions
    "Gaussian"Gaussian emissions
    distemissions for all states distributed as dist
    {dist1,,distn}emission distribution from state i
  • EstimatedProcess accepts the following settings for ProcessEstimator:
  • Automaticautomatically choose the parameter estimator
    "BaumWelch"maximize log-likelihood by expectation maximization
    "ViterbiTraining"decode most likely path and use supervised training
    "StateClustering"use clustering followed by supervised training
    "SupervisedTraining"estimation using both state and emission data
  • The methods , , and use no hidden state information whereas relies on having access to state path data.
  • Functions that work on data such as LogLikelihood accept Missing values.
  • RandomFunction[HiddenMarkovProcess[]] gives only emissions by default. With Method->{"IncludeHiddenStates"->True} it gives a TemporalData object td with the state sequence included as metadata. The hidden state data can retrieved using td["HiddenStates"].
  • HiddenMarkovProcess allows m to be an × matrix with non-negative elements and rows that sum to 1, em an × matrix with non-negative elements and rows that sum to 0 or 1, an integer between 1 and , and a vector of length of non-negative elements that sum to 1.
  • HiddenMarkovProcess can be used with such functions as LogLikelihood, FindHiddenMarkovStates, EstimatedProcess, PDF, Probability, and RandomFunction.
Introduced in 2014