Closed teoML closed 1 year ago
Unfortunately, you'll need to write out the HMM by hand (i.e., using the add_edge
and add_state
attributes) and pass in the mixture models when specifying the States objects. See the HMM tutorials. The from_samples
method only works with base distributions for now.
Unfortunately, you'll need to write out the HMM by hand (i.e., using the
add_edge
andadd_state
attributes) and pass in the mixture models when specifying the States objects. See the HMM tutorials. Thefrom_samples
method only works with base distributions for now.
Which tutorial exactly? Is there an example with GMM-HMM somewhere - I looked for it and could not find it. Thank you!
Sorry, I meant more that you can see a tutorial for how to write out a HMM using the add_edge
and add_state
methods.
@teoML HI! Do you solve the problem?
Thank you for opening an issue. pomegranate has recently been rewritten from the ground up to use PyTorch instead of Cython (v1.0.0), and so all issues are being closed as they are likely out of date. Please re-open or start a new issue if a related issue is still present in the new codebase.
Dear @jmschrei , thanks for creating this cool library! I have a problem with understanding how to create a GMM-HMM .
In my dataset for each timestep I have 4 sensor measurements (basically the observation) and they "generate" 3 different states (A1,A2,A3). I want to train an HMM (by using labeled training) and I want the emissions to be represented by a Gaussian Mixture Model since the sensor measurements don't seem to fit normal or any other known distribution. In terms of code, I tried out this approach (you can run it on google colab using this link https://colab.research.google.com/drive/10NF6xrCzuoQs7atH1hewhqhkiABFU61Y?usp=sharing ):
So, as you can see, I train 4 different GMMs for each of my features (sensor measurements). Now, I want to build an HMM which uses these Distributions for the emission probabilities. However, when running the code above I get an error: TypeError: from_samples() takes at least 3 positional arguments (2 given)
Can you explain how to correctly train a GMM-HMM for my case with my data? Thank you!