Questions tagged [hidden-markov-models]

Hidden Markov Models are a model for understanding and predicting sequential data in statistics and machine learning, commonly used in natural language processing and bioinformatics.

Hidden Markov Models (HMM) are a model for understanding and predicting sequential data in statistics and machine learning, commonly used in natural language processing and bioinformatics. In HMM, the hidden state variable cannot be observed, but usually some output variable that dependent on the hidden state is visible.

520 questions
4
votes
1 answer

How to simulate random states from fitted HMM with R package depmix?

I'm quite new to R, HMMs and depmix, so apologize if this question is too obvious. I fitted a toy model and want to simulate random sequences of predetermined length. The simulate function seems the way to go. My commands: mod <-…
Patrick
  • 2,577
  • 6
  • 30
  • 53
4
votes
1 answer

How to predict probability of a sentence?

How to determine the probability of a sentence "what is a cat" ? with associated PCFG : Rule , Probability S -> NP VB NN -> CAT , 1 DT -> what , 1 VB->is , .5 VB->be , .5 How can this pcfg with sentence be represented as hidden markov model ? Each…
blue-sky
  • 51,962
  • 152
  • 427
  • 752
4
votes
1 answer

Learning hidden markov model in R

A hidden Markov model (HMM) is one in which you observe a sequence of observations, but do not know the sequence of states the model went through to generate the observations. Analyses of hidden Markov models seek to recover the sequence of hidden…
4
votes
1 answer

How to map hidden states to their corresponding categories after decoding in hmmlearn (Hidden Markov Model)?

I would like to predict hidden states using Hidden Markov Model (decoding problem). The data is categorical. The hidden states include Hungry, Rest, Exercise and Movie. The observation set include Food, Home, Outdoor & Recreation and Arts &…
Isaiah
  • 607
  • 1
  • 5
  • 9
4
votes
1 answer

continuous gesture recognition using Hidden Markov Model

When we need to do gesture recognition, we should train several HMMs for each gesture. then when we need to classify the gesture we compute the sequence probability from each HMM and take the one with the highest likelihood But what to do when we…
4
votes
1 answer

Hidden Markov Model using multiple continuous observation variables

I am trying to use HMM for location prediction. I have the coordinates (x,y), speed and direction of motion. I have discretized the entire space into small blocks, that I use as states. The objective is to predict the location (state) of the object…
4
votes
1 answer

How to fit data into Hidden Markov Model sklearn/hmmlearn

I have a time series data set as a csv file with following columns- ID,TIMESTAMP,MEASUREMENTS[10] For an ID multiple measurements are there with the associated timestamp when those measurements were made. The column measurements contains a list of…
Pranay Mathur
  • 903
  • 2
  • 9
  • 19
4
votes
0 answers

Setting initial probabilities with depmix

I'm quite new to HMMs and depmix, so apologize if this question is too obvious. I have a dataset that represents students' sequences. Not sure if that is relevant for this problem, but I could provide a sample. So, I tried to model sequences using…
Srecko
  • 199
  • 4
  • 14
4
votes
1 answer

Training hmmlearn HMM with multiple classes of observation sequence

I have two training sets (observations of known class) representing the two possible states in my data. I would like to have hmmlearn estimate the start, transition, and emission probabilities from these two training sets. My data is a list of…
Adatar
  • 41
  • 1
  • 4
4
votes
3 answers

Learning Clojure: recursion for Hidden Markov Model

I'm learning Clojure and started by copying the functionality of a Python program that would create genomic sequences by following an (extremely simple) Hidden Markov model. In the beginning I stuck with my known way of serial programming and used…
waechtertroll
  • 607
  • 3
  • 17
4
votes
0 answers

JAGS - unable to find appropriate sampler

I am trying to develop a hierarchical Dirichlet-multinomial process hidden Markov model in JAGS to estimate multiparty, primary voting intention based on opinion poll results. I also use the primary vote estimate to calculate a two-party preferred…
Mark Graph
  • 4,969
  • 6
  • 25
  • 37
4
votes
1 answer

What does probabilities estimated at the boundary mean? Hidden Markov Models in R using depmixS4 package

I am new to Hidden Markov Models and I am currently trying to use continuous HMM to predict 6 activities on the UCI Human Activity Recognition data set (composed of accelerometer and gyroscope values) in R. I have both train data and test data, and…
4
votes
2 answers

scikit-learn GaussianHMM ValueError: input must be a square array

I am working with scikit-learn's GaussianHMM and am getting the following ValueError when I try to fit it to some observations. here is code that demonstrates the error: >>> from sklearn.hmm import GaussianHMM >>> arr = np.matrix([[1, 2, 3], [4, 5,…
Jay Hack
  • 139
  • 3
  • 10
4
votes
2 answers

Viterbi algorithm for second order HMM

I am trying to find some (preferably MATLAB) code for the Viterbi algorithm in a 2nd order HMM. I know how to apply it for a first order model, and understand the concept for 2nd order. However I am having trouble implementing it for a 2nd order…
alguru
  • 404
  • 6
  • 16
4
votes
1 answer

PyMC: Parameter estimation in a Markov system

A Simple Markov Chain Let's say we want to estimate parameters of a system such that we can predict the state of the system at time step t+1 given the state at timestep t. PyMC should be able to deal with this easily. Let our toy system consist of a…
Stefan
  • 1,246
  • 1
  • 9
  • 13