Questions tagged [hmmlearn]

hmmlearn is a scikit-learn offspring implementing unsupervised learning and inference in Hidden Markov Models.

hmmlearn is a scikit-learn offspring implementing unsupervised learning and inference in Hidden Markov Models.

130 questions
3
votes
0 answers

Bad quality of Viterbi Algorithm (HMM)

I've been trying to get into hidden Markov models and the Viterbi algorithm recently. I found a library called hmmlearn (http://hmmlearn.readthedocs.io/en/latest/tutorial.html) to help me generate a state sequence for two states (with Gaussian…
Billy
  • 31
  • 5
3
votes
1 answer

Fitting data to hmm.MultinomialHMM

I'm trying to predict the most optimal sequence given some data using the hmmlearn library, but I get an error. My code is: from hmmlearn import hmm trans_mat = np.array([[0.2,0.6,0.2],[0.4,0.0,0.6],[0.1,0.2,0.7]]) emm_mat =…
lordingtar
  • 1,042
  • 2
  • 12
  • 29
3
votes
2 answers

Formatting data for hmmlearn

I'm trying to fit a hidden Markov model using hmmlearn in python. I assume that my data is not formatted correctly, however the documentation is light for hmmlearn. Intuitively I would format the data as a 3 dimensional array of n_observations x…
piman314
  • 5,285
  • 23
  • 35
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
2 answers

Error when importing HMM package (hmmlearn)

When I try to import the hmmlearn package with import hmmlearn, I get this error: --------------------------------------------------------------------------- AttributeError Traceback (most recent call…
Alex905
  • 25
  • 3
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
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

"hmmlearn" TypeError: ufunc 'log' not supported for the input types,

I use hmmlearn to decode. Hidden state has six topics and observations are 345 words. start_probability is enter image description here transition_probability is enter image description here My code is: model =…
L. Eileen
  • 21
  • 2
2
votes
1 answer

Hidden Markov Model with Both Continuous and Discrete Emission Probability

Recently I come up with a problem the observe variables contain 4 continuous variables and a discrete variable. I want to model it with HMM, but I don't know implement it. Do you have know any related papers about this?
Wenmin Wu
  • 1,808
  • 12
  • 24
2
votes
6 answers

Unable to install hmmlearn in Python 3

Failed building wheel for hmmlearn Command "C:\Users\Akash\PycharmProjects\hello\venv\Scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Akash\AppData\Local\Temp\pycharm-packaging\hmmlearn\setup.py';f=getattr(tokenize, …
Akash Munshi
  • 21
  • 1
  • 1
  • 6
2
votes
1 answer

Can we do supervised learning through HMM?

I believe I understand HMM at its core. Through HMM we solve evaluation (prob of emitted seq), decoding (most probable hidden seq), and learning problem (learning transition and emission prob-matrix from observed set of emission seq). My problem is…
zeal
  • 465
  • 2
  • 11
  • 22
2
votes
0 answers

How to concatenate phone hmm model to a composite word or sentence hmm model

I want to do the embedded training for speech recognition. In the beginning, I want to use the monophone with 3-states, as the paper decripted, I can concatenate all the phones in one word or sentence to make a composited hmm model, and do embedded…
YonF
  • 641
  • 5
  • 20
1
2
3
8 9