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
16
votes
1 answer

Decoding sequences in a GaussianHMM

I'm playing around with Hidden Markov Models for a stock market prediction problem. My data matrix contains various features for a particular security: 01-01-2001, .025, .012, .01 01-02-2001, -.005, -.023, .02 I fit a simple GaussianHMM: from…
datasci
  • 1,019
  • 2
  • 12
  • 29
12
votes
1 answer

How does the HMM model in hmmlearn identifies the hidden states

I am new to Hidden Markov Models, and to experiment with it I am studying the scenario of sunny/rainy/foggy weather based on the observation of a person carrying or not an umbrella, with the help of the hmmlearn package in Python. The data used in…
Luiz Vieira
  • 570
  • 11
  • 35
11
votes
1 answer

Prediction step for time series using continuous hidden Markov models

I am trying to predict stock market using a Gaussian HMM. I am not getting how the prediction step is done after the model has been trained. I did not understand how exactly predicting the most likely state sequence can help to predict future…
Vibhav
  • 131
  • 1
  • 5
5
votes
1 answer

how to run hidden markov models in Python with hmmlearn?

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,…
lgd
  • 1,472
  • 5
  • 17
  • 35
4
votes
1 answer

How to implement Hidden Markov Model on multiple columns?

I'm having trouble implementing a HMM model. I'm starting with a pandas dataframe where I want to use two columns to predict the hidden state. I'm using the hmmlearn package. I'm following the instructions for hmmlearn 'Working with multiple…
4
votes
1 answer

How to train HMM with audio senteces dataset for speech recognition?

I have read some journals and paper of HMM and MFCC but i still got confused on how it works step by step with my dataset (audio of sentences dataset). My data set Example (Audio Form) : hello good morning good luck for you exam etc about 343 audio…
4
votes
2 answers

How to resolve No module named 'hmmlearn' error in Jupyter Notebook

I'm new to hmmlearn and am trying to use the Jupyter Notebook to work through this Gaussian HMM of stock data example. However, when I run the following code, I get an error. from __future__ import print_function import datetime import numpy as…
4
votes
2 answers

celery 'Worker-n' pid:xxxx exited with 'exitcode 1' when I import hmmlearn

In my tasks.py file, when I import hmmlearn, from hmmlearn import hmm and start my celery workers, I get the following error [2017-06-14 09:18:27,638: INFO/MainProcess] Received task:…
user1697058
  • 115
  • 1
  • 9
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

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
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
3
votes
1 answer

Divide by zero encountered in true_divide while fitting GMMHMM hmmlearn model

I am trying to train an gmmhmm with the hmmlearn model with multi-variate timeseries of 25 features in the following way: hmm_g = hmm.GMMHMM(n_components=4, n_mix=2).fit(X, lengths) where X is an array with shape (timeseries_dataset_length, 25)…
Hojas
  • 51
  • 2
3
votes
0 answers

Hidden Markov Model (HMM) in python (hmmlearn) always predicting same value for time series

I have been attempting to use the hmmlearn package in python to build a model predicting values of a time series. I have based my code on this article, detailing how to use the package for a stock price time series. After fitting the model on a…
3
votes
0 answers

how to import with python3 pkl file saved in python2

I am running some demo code from vehicle-prediction. When comes to the models in models directory, I can load this model model_2000_car_100_iter_v.pkl in Python2, but My integration environment is Python3. So when I run the codes to load the model…
wenyunlong
  • 31
  • 2
3
votes
1 answer

Is it possible to fit a multivariate GMHMM in hmmlearn?

I know it is possible to fit several sequences into hmmlearn but it seems to me that these sequences need to be drawn from the same distributions. Is it possible to fit a GMHMM with several observations sequences drawn from different distributions…
Axel Der
  • 421
  • 3
  • 10
1
2 3
8 9