1

I am trying to implement HMM Learning/training with the continuous data set which is in sequential form. I have tried to construct a new HMM training with Gaussian Mixture/EM Algo, but I have been facing some issues, so i switch to hmmlearn library in python.

Overview about my data set

For e.g, A list contains normalized training data.

Total elements inside the list = 75

Each element inside the list is an np array.

The data inside the list is Vehicle driving data which is continuous.

'X_train = [[100*4], [100*4], [100*4], [100*4].........................[100*4]]' 
len(X_train) = 75
X_Train[0] = [100*4]
X_Train.columns=['Speed','Angle', 'Acceleration1', 'Acceleration2']

Every [100*4] data received from vehicle at specific time intervals. Lets say X_train[0] is 15 to 30 seconds driving study data. X_train[1.] may be 15 to 30 seconds driving study data and so on .....

problem in hmmlearn

In hmmlearn library i would like to clarify some queries. My objective is to get the parameters of the trained model for my dataset like initial prob, state transition prob, Gaussian weights, mean & covariance, so,.

Model created with 2 Hidden states with 2 Gaussian

model = hmm.GMMHMM(n_components=2, n_mix=2, covariance_type="diag", n_iter=100)

Question 1:

should I concatenate my overall data set into a single list as stated in the document Working with multiple seq from hmmlearn document?

If it is, then my training data set (X) will look like with size of 7500 *4, also, the lengths parameter will have a list like lengths = [100, 100, 100, ......100]

Is this the way fit should be implemented?

Question: 2

How can i check my EM Algo converges? I have seen the document for monitor_ function. But I am not able to understand.

Question: 3

After training, i would like to check the probability (using Forward Algorithm) of non-trained sequence of size 100*4. So what is the required function to apply forward algorithm using trained model parameters?

I have posted many question related to HMM training, But I have no satisfied answers based on my requirement. I hope hmmlearn library helps

Mari
  • 698
  • 1
  • 8
  • 27
  • I have the same question. I did it exactly the same way and fitted the model, but it seems not to update its parameter – Bo Ni Jul 21 '19 at 03:43

0 Answers0