Questions tagged [hidden-markov-model]

Hidden Markov Models are used for modelling systems that are assumed to be Markov processes with hidden (i.e. unobserved) states.

A hidden Markov model is a three-tuple $\left\langle\vec{\pi},A,B\right\rangle$ with $\vec{\pi}$ a probability vector over the $n$ hidden states, $A$ an $n\times n$ transition matrix and $B$ an $n\times m$ emission matrix. $\pi_i$ describes the probability of the system being in hidden state $i$ at time step $0$, $a_{ij}$ describes the probability of the system being in hidden state $j$ at time $t+1$ given it was in hidden state $i$ at time $t$. $b_{ik}$ describes the probability of observing $k$ given the system is in hidden state $i$.

A Markov model thus describes a Markov process, but where the state of the system is "hidden" and only observations can be seen. Such process can be trained for several applications (speech recognition, part-of-speech tagging and computational biology). It can be trained using the popular Baum-Welch algorithm and the most probable sequence of hidden states can be calculated using the Viterbi algorithm.

The standard HMM can be viewed graphically as follows:

enter image description here

Where $Z_t$ is the hidden state and $X_t$ is the observation at time $t$. We can use the conditional independence structure expressed by this graphical model to derive the algorithms above.

Extensions exist such that continuous output is supported as well.

563 questions
58
votes
12 answers

Resources for learning Markov chain and hidden Markov models

I am looking for resources (tutorials, textbooks, webcast, etc) to learn about Markov Chain and HMMs. My background is as a biologist, and I'm currently involved in a bioinformatics-related project. Also, what are the necessary mathematical…
bow
  • 121
  • 1
  • 3
  • 4
50
votes
5 answers

What is the difference between the forward-backward and Viterbi algorithms?

I want to know what the differences between the forward-backward algorithm and the Viterbi algorithm for inference in hidden Markov models (HMM) are.
47
votes
3 answers

Intuitive difference between hidden Markov models and conditional random fields

I understand that HMMs (Hidden Markov Models) are generative models, and CRF are discriminative models. I also understand how CRFs (Conditional Random Fields) are designed and used. What I do not understand is how they are different from HMMs? I…
29
votes
1 answer

Difference between Hidden Markov models and Particle Filter (and Kalman Filter)

Here is my old question I would like to ask if someone knows the difference (if there is any difference) between Hidden Markov models (HMM) and Particle Filter (PF), and as a consequence Kalman Filter, or under which circumstances we use which…
22
votes
3 answers

Hidden Markov Model vs Recurrent Neural Network

Which sequential input problems are best suited for each? Does input dimensionality determine which is a better match? Are problems which require "longer memory" better suited for an LSTM RNN, while problems with cyclical input patterns (stock…
22
votes
2 answers

Hidden Markov Model vs Markov Transition Model vs State-Space Model...?

For my master's thesis, I am working on developing a statistical model for the transitions between different states, defined by serological status. For now, I won't give too many details into this context, as my question is more general/theoretical.…
Ryan Simmons
  • 1,563
  • 1
  • 13
  • 25
21
votes
2 answers

What are the differences between the Baum-Welch algorithm and Viterbi training?

I am currently using Viterbi training for an image segmentation problem. I wanted to know what the advantages/disadvantages are of using the Baum-Welch algorithm instead of Viterbi training.
19
votes
4 answers

Training a Hidden Markov Model, multiple training instances

I've implemented a discrete HMM according to this tutorial http://cs229.stanford.edu/section/cs229-hmm.pdf This tutorial and others always speak of training a HMM given an observation sequence. What happens when I have multiple training sequences?…
Ran
  • 1,476
  • 3
  • 16
  • 25
17
votes
1 answer

Usage of HMM in quantitative finance. Examples of HMM that works to detect trend / turning points?

I am discovering the marvellous world of such called "Hidden Markov Models", also called "regime switching models". I would like to adapt a HMM in R to detect trends and turning points. I would like to build the model as generic as possible so that…
RockScience
  • 2,731
  • 4
  • 27
  • 46
17
votes
6 answers

Hidden Markov models with Baum-Welch algorithm using python

I'm looking for some python implementation (in pure python or wrapping existing stuffs) of HMM and Baum-Welch. Some ideas? I've just searched in google and I've found really poor material with respect to other machine learning techniques. Why?
nkint
  • 768
  • 3
  • 9
  • 20
14
votes
3 answers

Hidden Markov model thresholding

I have developed a proof of concept system for sound recognition using mfcc and hidden markov models. It gives promising results when I test the system on known sounds. Although the system, when an unknown sound is inputted returns the result with…
13
votes
1 answer

How do I train HMM's for classification?

So I understand that when you train HMM's for classification the standard approach is: Separate your data sets into the data sets for each class Train one HMM per class On the test set compare the likelihood of each model to classify each…
Alex McMurray
  • 193
  • 1
  • 2
  • 7
13
votes
1 answer

Calculating confidence intervals via bootstrap on dependent observations

The bootstrap, in its standard form, can be used to calculate confidence intervals of estimated statistics provided that observations are iid. I. Visser et al. in "Confidence Intervals for Hidden Markov Model Parameters," used a parametric bootstrap…
Sadeghd
  • 403
  • 4
  • 8
13
votes
2 answers

Number of parameters in Markov model

I want to use BIC for HMM model selection: BIC = -2*logLike + num_of_params * log(num_of_data) So how do I count the number of parameters in the HMM model. Consider a simple 2-state HMM, where we have the following data: data = [1 2 1 1 2 2 2 1 2 3…
12
votes
2 answers

Scaling the backward variable in HMM Baum-Welch

I am just trying to implement the scaled Baum-Welch algorithm and I have run into a problem where my backward variables, after scaling, are over the value of 1. Is this normal? After all, probabilities shouldn't be over 1. I am using the scale…
1
2 3
37 38