# Hidden Markov Processes with Discrete or Continuous, Univariate or Multivariate Emissions

Define the initial probabilities and the conditional transition probabilities for the hidden states' dynamics.

 In:= Xp0 = {1/2, 1/2}; tm = {{3/4, 1/4}, {2/5, 3/5}};

Define hidden Markov process with categorical emissions.

 In:= Xhmm1 = HiddenMarkovProcess[p0, tm, {{2/3, 1/3}, {0, 1}}]; Define hidden Markov process with general discrete emissions.

 In:= Xhmm2 = HiddenMarkovProcess[p0, tm, {GeometricDistribution[1/3], NegativeBinomialDistribution[5, 1/4]}]; Define hidden Markov process with continuous emissions.

 In:= Xhmm3 = HiddenMarkovProcess[p0, tm, {NormalDistribution[2, 1], StudentTDistribution[-2, 1, 7]}]; Define hidden Markov processes with multivariate emissions.

 In:= Xhmm4 = HiddenMarkovProcess[p0, tm, {MultivariatePoissonDistribution[2, {5, 6}], NegativeMultinomialDistribution[6, {1/3, 1/4}]}]; In:= Xhmm5 = HiddenMarkovProcess[p0, tm, {BinormalDistribution[{-1, 2}, {1, 1}, 1/2], BinormalDistribution[{2, -1}, {1, 1}, -1/2]}]; Sample each hidden Markov process.

 In:= XprocList = {hmm1, hmm2, hmm3, hmm4, hmm5};
 In:= XpathList = Table[RandomFunction[proc, {0, 100}], {proc, procList}];

Compute loglikelihood of each path for the respective process.

 In:= XMapThread[LogLikelihood, {N[procList], pathList}]
 Out= Visualize sample paths of processes with univariate emissions.

 Out= Visualize components of sample paths of processes with multivariate emissions.

 Out= ## Mathematica

Questions? Comments? Contact a Wolfram expert »