initialize HiddenMarkovModelTrainer object
-
06-11-2019 - |
Question
i'm doing gesture recognition in python and one the the more complete library i've found that can manage Hidden Markov Model is nltk. But there is something that i can't understand.
First of all, the data. I have coordinates of the gesture and i have clustized them in 8 cluster (with k-means). so this is my gesture structure:
raw coordinates x,y: [[123,16], [120,16], [115,16], [111,16], [107,16], [103,17], ...]
centroids x,y : [[ 132.375 56.625 ]
[ 122.45454545 30.09090909]
[ 70.5 27.33333333]
...]
labels: [5 6 6 6 6 6 6 2 2 2 2 2 2 4 4 4 ...]
Now i want to train an HMM with Baum-Welch with my . So HiddenMarkovModelTrainer is my class.
I've found in internet some few more implementations of baum welch, but only in Matlab. the implementation of this algorithms tipically need this input:
baum-welch(X, alphabet, H)
where - X is the data for train (in my case - labels) - alphabet the possible values of the data (in my case - 0,1,2,3,4,5,6,7) - H the number of hidden states
Now i am confused because in ntlk.HiddenMarkovModelTrainer constructor i have to give states and symbols and i don't know what they should be, considering that the data to train X is the imput of HiddenMarkovModelTrainer.train_unsupervised() method i think that my alphabet is symbol.. i don't know what to put in states.
i hope my explanation is clear even if my english is poor.
No correct solution