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

HMM - why we need using sub-state when use HMM for recognition

I'm new Machine learning, I'm using Hidden Markov model to recognition activities. I have 9 different activities.I'm using Jahmm library. My data collect from accelerometer sensor. The vector like[ 270.0 2280.0 390.0 202.706888932921 ] for each…
Khanh Tran
  • 41
  • 3
2
votes
1 answer

What is the difference between dynamic Naive Bayes Classifier and Naive Bayes Classifier

I current use HMM to predict the solar radiation. The traditional HMM model can only take one observation sequence data into consideration. However, when I use Gibbs sampling to estimate the hidden states reduces 4 and error is high. Now, I am…
2
votes
0 answers

How to implement kfold cross validation in hmmlearn?

The hmmlearn tutorial demonstrates how a Hidden Markov Model can be fitted to a dataset: model = hmm.GaussianHMM(n_components=3, covariance_type="full", n_iter=100) model.fit(X) Is there a built-in way to do cross validation, Or do I have to do…
Oblomov
  • 8,953
  • 22
  • 60
  • 106
2
votes
2 answers

hmmlearn: how to get the prediction for the hidden state probability at time T+1, given a full observation sequence 1:T

I'm using hmmlearn's GaussianHMM to train a Hidden Markov Model with Gaussian observations. Each hidden state k has its corresponding Gaussian parameters: mu_k, Sigma_k. After training the model, I would like to calculate the following…
cwl
  • 501
  • 2
  • 7
  • 18
2
votes
1 answer

How to use sklearn HMM to calculate the likelihood of the observed data

There are three fundamental problems for HMMs: Given the model parameters and observed data, estimate the optimal sequence of hidden states. Given the model parameters and observed data, calculate the likelihood of the data. Given just the observed…
ybdesire
  • 1,593
  • 1
  • 20
  • 35
1
vote
0 answers

Problem with running a pre trained HMM_TAGGER for business process model labels

I tried to run a pre trained python HMM_TAGGER provided on http://www.henrikleopold.com/downloads/ under the section "Label Parsing Technique". The HMM_TAGGER script is written in python 2 and when i am running it i get an "TypeError: coercing to…
1
vote
1 answer

MultinomialHMM: ValueError: Total count for each sample should add up to the number of trials

I am trying this example from the forum below which works for the others. But I am getting the error below for some reason. What am I missing? Link to tutorial (from superbobry): https://github.com/hmmlearn/hmmlearn/issues/70 import numpy as np from…
maximus
  • 335
  • 2
  • 16
1
vote
0 answers

Can features be given as input to hidden markov model?

I want to train a HMM classifier with features as input. Considering two observation states(o1, o2) and two hidden states(h1, h2), and some initial probability I apply a supervised algorithm and on the basis of the classifier output, calculate the…
1
vote
1 answer

Difference between number of states and number of mixtures in Gaussian Mixture Model?

I am using the GMMHMM library and I can not figure out the difference between n_components : Number of states in the model. n_mix : Number of states in the GMM.
1
vote
0 answers

Error in emission matrix from hmmlearn package in Python?

In a data, I have fit a GaussianHMM model using the hmmlearn package available in Python. For this purpose, I refered to the questions asked here: HMMlearn Emission Matrix Question on StackOverflow and also this one: HMMlearn Emission Matrix…
sumitpal0593
  • 194
  • 1
  • 3
  • 18
1
vote
0 answers

Hmmlearn with absorbing state

I am trying to build a Gaussian HMM model with an absorbing state. Is there a way to specify the identity distribution of state 4, the absorbing state? In my dataset values range from 20 to 100 and I have tried to give it the '999' value, but…
1
vote
0 answers

One(state)-to-Many(emissions) Hidden Markov Model in Python

Is there a way to implement a Hidden Markov Model wherein a single state can emit multiple emission symbols (one[state]-to-many[emissions])? For instance, suppose I have two states states = {S1, S2} and four emission symbols symbols = {A, B, C, D}.…
batlike
  • 668
  • 1
  • 7
  • 19
1
vote
1 answer

How to solve ValueError: Expected 2D array, got scalar array instead error in python?

I have a nX2 dimension array and I have some HMM models defined. Now, for each of the HMM models present, I am trying to calculate the log-likelihood value for each of the values present in the nx2 array. For this, I am using the score function in…
sumit808
  • 23
  • 4
1
vote
1 answer

HMMlearn library -ergodic and left-to-right topology

I have used the HMMlearn library to perform gesture recognition and in some gestures I would like to use the ergodic topology, and in other the left-to-right one. Is the topology inside the architecture of the HMM defined by the 'covariance'…
1
vote
1 answer

Why do I get "'diag' mixture covars must be non-negative" error when I use model.score in hmmlearn package?

I've been working on continues speech recognition for a month and I found hmmlearn package. I could create my phoneme models with _model = hmm.GMMHMM(...) and _model.fit(...). But when I want to use _model.score(_extracted_test_features) for test…
Ali Esmailpor
  • 1,209
  • 3
  • 11
  • 22
1 2
3
8 9