hidden-markov-models

Finding the top - k viterbi paths in HMM

流过昼夜 提交于 2019-12-04 18:46:39
问题 I need to write an algorithm that finds the top-k viterbi paths in a HMM (using the regular viterbi algorithm to find the best path). I think I probably need to save a list V_t,N of size k for each state N that contains the top-K paths that end in state N, but I am not so sure how to keep track of that list.. any ideas? Thanks 回答1: We can solve this with some care. It is easiest to see by looking at the trellis structure of hmm: In this example the hidden states are 00, 01, 10, 11, denote the

3-state phone model in Hidden Markov Model (HMM)

99封情书 提交于 2019-12-04 15:18:29
I want to ask regarding the meaning of 3-state phone model in HMM. This case is based on the theory of HMM in speech recognition system. So the example is based on the acoustic modeling of the speech sounds in HMM. I get this example picture from a journal paper: http://www.intechopen.com/source/html/41188/media/image8_w.jpg Figure 1: 3-State HMM for the sound /s/ So, my question is: what is it mean by 3 state? what actually S1, S2 & S3 mean? (I know it is state but it represent what?) How to represent the /s/ sound in this HMM state? Why is it 3? what happen if we have 4, 5 or more state? If

how to run hidden markov models in Python with hmmlearn?

╄→尐↘猪︶ㄣ 提交于 2019-12-04 13:34:15
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 3 years ago . I tried to use hmmlearn from GitHub to run a binary hidden markov model. This does not work: import hmmlearn.hmm as hmm transmat = np.array([[0.7, 0.3], [0.3, 0.7]]) emitmat = np.array([[0.9, 0.1], [0.2, 0.8]]) obs = np.array([0, 0, 1, 0, 0]) startprob = np.array([0.5, 0.5]) h = hmm.MultinomialHMM(n_components=2, startprob=startprob, transmat=transmat) h.emissionprob_ = emitmat

How can HMMs be used for handwriting recognition?

自闭症网瘾萝莉.ら 提交于 2019-12-04 12:57:33
问题 The problem is a bit different than traditional handwriting recognition. I have a dataset that are thousands of the following. For one drawn character, I have several sequential (x, y) coordinates where the pen was pressed down. So, this is a sequential (temporal) problem. I want to be able to classify handwritten characters based on this data, and would love to implement HMMs for learning purposes. But, is this the right approach? How can they be used to do this? 回答1: I think HMM can be used

Determinig the number of hidden states in a Hidden Markov Model

可紊 提交于 2019-12-04 10:35:46
I am learning about Hidden Markov Models for classifying motion in a sequence of t image frames. Assume I have m dimensions of feature from each frame. Then I cluster it into a symbol (for observable symbol). And I create k different HMM model for k class. Then, how do I determine the number of hidden states for each model to optimise prediction ? Btw, is my approach correct? If I misunderstood how to use it, please correct me:) Thanks :) "is my approach already correct?" Your current approach is correct. I have done the same thing some weeks ago and had asked the same questions. I have built

Hidden Markov Model predicting next observation

我怕爱的太早我们不能终老 提交于 2019-12-04 08:37:39
问题 I have a sequence of 500 observations of the movements of a bird. I want to predict what the 501st movement of the bird would be. I searched the web and I guess this can be done by using HMM, however I do not have any experience on that subject. Can anyone explain the steps of an algorithm used to solve this problem? 回答1: x1-x2-x3-x4-x5......x500-x501 | | | | | | y1 y2 y3 y4 y5 y500 x - actual state y - observations P(y_i|x_i) - how you think the observation depends on the actual state P(x_i

Hidden Markov Model for multiple observed variables

拟墨画扇 提交于 2019-12-04 07:38:21
问题 I am trying to use a hidden Markov model (HMM) for a problem where I have M different observed variables (Yti) and a single hidden variable (Xt) at each time point, t. For clarity, let us assume all observed variables (Yti) are categorical, where each Yti conveys different information and as such may have different cardinalities. An illustrative example is given in the figure below, where M=3. My goal is to train the transition,emission and prior probabilities of an HMM, using the Baum-Welch

Predicting future emissions from fitted HMM model

て烟熏妆下的殇ゞ 提交于 2019-12-04 02:20:14
问题 I've fitted a HMM model to my data using hmm.discnp package in R as follows: library(hmm.discnp) zs <- hmm(y=lis,K=5) Now I want to predict the future K observations (emissions) from this model. But I am only able to get most probable state sequence for the observations that I already have through Viterbi algorithm. I have t emissions already , i.e (y(1),...,y(t)) . I want the most probable future K emissions from the fitted HMM object i.e (y(t+1),...y(t+k)) . Is there a function to calculate

What is the equivalent for a Hidden Markov Model in the WEKA toolkit?

可紊 提交于 2019-12-03 16:17:09
I need to classify a datastream which comes from a sensor network consisting of 8 accelerometers. Each accelerometer gives me a X Y and Z value. Thus at each sample i have 8 x 3 = 24 acceleration values. I sample at about 30 hz and the performance time is about 0.5 seconds. At first i thought of using a Hidden Markov model for this but it seems that the WEKA toolkit does not provide such a thing. What is the WEKA equivalent for this? Thank you. EDIT: how to format data? I have collected data and now i want to use the HMMWeka for classification. On the website it states that Data instances must

How can HMMs be used for handwriting recognition?

你说的曾经没有我的故事 提交于 2019-12-03 07:56:26
The problem is a bit different than traditional handwriting recognition. I have a dataset that are thousands of the following. For one drawn character, I have several sequential (x, y) coordinates where the pen was pressed down. So, this is a sequential (temporal) problem. I want to be able to classify handwritten characters based on this data, and would love to implement HMMs for learning purposes. But, is this the right approach? How can they be used to do this? I think HMM can be used in both problems mentioned by @jens. I'm working on online handwriting too, and HMM is used in many