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
2
votes
0 answers

Function that returns a hidden state given a set of observations using Python Hmmlearn Multinomial

I have been stuck on a problem regarding a python function using Multinomial HMM (from hmmlearn) for a while... The general idea is for the HMM be capable of finding the hidden state (0, 1 or 2) given a set of observations where each is composed by…
2
votes
1 answer

Reproducing Hamilton 1989 Markov Switching Model in PyMC3

I am trying to understand of Hamilton's 1989 Markov-Switching Autoregression model. I attempt to reproduce the results with a Bayesian twist. I wrote a number of PyMC3 models using Eric Ma's tutorial about HMM's in PyMC3 and the latest iteration can…
mhschel
  • 75
  • 1
  • 7
2
votes
0 answers

how to train and test a model in R use depmixS4 package?

I am creating a model for finding hidden states using the example of the sp500 price time series. my task is to find two states on the training and test set. library(quantmod) library(plotly) library(depmixS4) # train sample getSymbols("^GSPC",…
2
votes
1 answer

How to use depmixS4 for classification?

I'm trying to use the depmix S4 package in r to classify stock price movements (1 for up, 0 for down). The top few rows of my data is below: Date Open High Low Close Adj.Close Volume Movement 01/12 …
2
votes
2 answers

How to predict out-of-sample observations with depmixS4 package in R?

I have a series of univariate data and I want to fit a Hidden Markov Model on it using the depmixS4 package on R. My final goal is to predict the next k observations (let's say k = 10) for the data series. I am not really interested in predicting…
A1010
  • 360
  • 5
  • 18
2
votes
0 answers

What does it mean when a covariance matrix values are all the same in hmmlearn - GMMHMM?

I am working with GMMHMM from hmm learn for speaker recognition. After training the model, I found that all the values in the covariance matrix (covars_) all have the same values. I initialised my hmm as follows model = hmm.GMMHMM(n_components=5,…
2
votes
1 answer

How to train a hidden markov model with constrained probabilities (or missing links between hidden states)?

I have a hidden Markov model (HMM) with 3 hidden states and 2 discrete emission symbols. I know that the probability of transitioning from state 2 to state 3 is 0 (i.e. there is no direct link from S2 to S3). What is the best way of fitting the…
2
votes
1 answer

How to create a transition matrix from dictionary with transitions and counts

I am trying to create an HMM and I want to create my transition matrix but i'm not sure how. I have a dictionary with transitions and the probability of those transitions occuring which looks as follows (only larger): {(1, 2):…
WibeMan
  • 91
  • 7
2
votes
1 answer

Params argument in hmmlearn GMMHMM not working as intended

I have one-dimensional (single feature) data that I want to fit a GMMHMM to. There are two hidden states and I know the probability distribution of the output from each of the states. That is, I know the prior distribution and hence the GMM…
Sashi
  • 79
  • 11
2
votes
2 answers

I want to use hidden markov model for data prediction

I am new to machine learning models and data science libraries. I wanted to use the Hidden Markov model for statistical data prediction on the fly which read the data from kafka and builds the model which is used to predict the data during the…
2
votes
1 answer

How to build a new voice (language) for festival using HTS

I want to build my own TTS (Text to Speech) App using HTS (HMM-based speech synthesis system) for the Arabic language. I fail to find any step by step instructions on how to build the synthesizer using HTS. What I have done is to download the sample…
2
votes
1 answer

R alternatives to JAGS/BUGS

Is there an R-Package I could use for Bayesian parameter estimation as an alternative to JAGS? I found an old question regarding JAGS/BUGS alternatives in R, however, the last post is already 9 years old. So maybe there are new and flexible gibbs…
2
votes
0 answers

HMM - Does Foward-Backward algorithm has the same result as Viterbi if all transitions are possible?

I am attending a Bioinformatics class and we are learning about HMMs to make inference about DNA sequences. Well, we recently learned about the forward-backward algorithm that gives us the probability of being in a given state at time t given some…
Daniel Oliveira
  • 1,280
  • 14
  • 36
2
votes
0 answers

Implementing Hidden Markov Model with variable emission and transition matricies

I'm trying to implement map matching using Hidden Markov Models in Python. The paper I'm basing my initial approach off of defines equations that generate their transition and emission probabilities for each state. These probabilities are unique to…
2
votes
0 answers

How to compare states in Hidden Markov Models in R using depmixS4 package?

I am working with this minimal example that I pared down from this blog and I am wondering how to match up the states properly. The example code simulates two states, state 1 is positive return with low volatility and state 2 is negative return…
Roger J Bos CFA
  • 474
  • 4
  • 16