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
1
vote
2 answers

ImportError: No module named hmmlearn.hmm python 2.7

I got this error in python script: from hmmlearn.hmm import GaussianHMM I know I need some libraries thats why I ran following git clone git://github.com/hmmlearn/hmmlearn.git pip install -U --user hmmlearn I getting stuck because of this…
Prajakta Dumbre
  • 231
  • 1
  • 3
  • 8
1
vote
1 answer

Error compiling C code for python hmmlearn package

I'm having some trouble getting the hmmlearn package to install properly (in a virtual environment); it seems to have something to do with the underlying C code. The package installs fine with pip, but when I try to import the core class, I get an…
kronosapiens
  • 1,333
  • 1
  • 10
  • 19
1
vote
0 answers

Python: HMM implementation in MFCC features

With MFCC features as input data (Numpy array of (20X56829)), by applying HMM trying to create audio vocabulary from decoded states of HMM.I have 10 speakers in the MFCC features. I need 50 states per speaker. So I used N = 500 states and it throws…
Rangooski
  • 825
  • 1
  • 11
  • 29
1
vote
1 answer

Python(hmmlearn):Value Error[could not broadcast input array from shape]

I am running sample code for building HMM model, but i see it gives me Value error.Probably its a numpy error. import hmmlearn.hmm as hmm transmat = np.array([[0.7, 0.3], [0.3, 0.7]]) emitmat = np.array([[0.9, 0.1], …
aman
  • 1,875
  • 4
  • 18
  • 27
1
vote
1 answer

Python - hmmlearn - Negative transmat

I'm trying to fit a model with hmmlearn given a transition matrix and an emisison matrix a priori. After fit, it gives some negative values in the transition matrix. The transition matrix is recovered by the transition matrix of another model. A…
0
votes
0 answers

Single state Markov Model

I am trying to understand how Hidden Markov Models work. Using hmmlearn library, I want to see if a time-series can be posible under a learned distribution. I start with a single state markov model. I generate a gaussian sequence with mean 0 and…
0
votes
0 answers

Apply HMM to task step prediction

I have a video and I'm using a prediction model to get the actions. We can suppose that I'm getting Top 5 predicted action labels for that video. # Pass the input clip through the model with torch.no_grad(): prediction =…
Georgia
  • 109
  • 1
  • 6
0
votes
0 answers

ModuleNotFoundError: No module named 'hmmlearn' in Jupyter Notebook

I keep trying to import hmmlearn as hmm and even though i have tried installing it several ways, inlcuding the ways i have seen on other stack overflow pages or on github, I still keep getting this error. In the terminal shell, it says that I have…
0
votes
1 answer

IndexError: boolean index did not match indexed array along dimension 0; dimension is 1 but corresponding boolean dimension is 3301

I'm trying to train a model for speaker identification using MFCC and HMM, during run time I got the following error line 55, in X = X_train[y_train == speaker] IndexError: boolean index did not match indexed array along dimension 0;…
MStudent
  • 1
  • 3
0
votes
0 answers

Expected probability from a multinomial HMM using HMMLearn

I am upskilling on Hidden Markov models, and I came across a Python package called hmmlearn. I been playing with the multinomial example here -> https://hmmlearn.readthedocs.io/en/latest/auto_examples/plot_multinomial_hmm.html I had a question about…
0
votes
0 answers

Creating a new dataset of hidden state probabilities using a HMM results in different shapes after each run

I'm trying to create a new dataset of hidden state probabilities using a hidden Markov model. Everything works fine unless each time the output dataset comes up with different values (sometimes the same values) for hidden_states_train and…
0
votes
0 answers

Training Hidden Markov Chain model with different Mixture Gaussian emission distribution for different states

I am trying to train a Hidden Markov Chain model with different Mixuture Gaussian emission distribution for different states. What I want is the number of mixtures of gaussian for each state is different. For example, for state 1, the emission…
0
votes
1 answer

How to fix : Exception has occurred: ZeroDivisionError division by zero

Currently working on ML project for testing and training models and I got this zero division error on this line. p_bar.set_description('{}. Testing Data of phoneme "{}" against all models \nResult: {}/{} correct prediction;\n accuracy:…
0
votes
0 answers

Error with importing hmm from hmmlearn in python3

facing this error when trying to import hmmlearn.hmm. Any suggestion on resolve this? the filepath '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/hmmlearn' has already these files. But the error has a warning…
0
votes
0 answers

Hidden Markov Model Output Error (Python): Sequence is Impossible

I am trying to predict the state of rain based on observed rainfall in centimeters. The three states are ' little rain' 'some rain' and 'a lot of rain'. For the prediction, when I enter the amount of rainfall, I am getting an error below. Can…
1 2 3
8 9