Closed jiyer2016 closed 5 years ago
Hey, sorry for the late reply. I had a deadline last night I was trying to make.
What is your data and version of pomegranate? I pushed changes to gamma distributions recently, but can't remember if those fixes are in the latest release or the changes I will be pushing in the next week. Maybe try cloning the latest code and building from source?
Sorry for my delayed response as well. I am using version 0.10.0. However, I'll see if the upgrade works. Thanks.
Please re-open if you're still having problems.
I generated multivariate data using a GammaDistribution and am training a Hidden Markov Model on the data.
The shape of my data is as follows - 1000 sequences - each containing 100 timesteps, with each timestep composed of 3 features:
model = HiddenMarkovModel.from_samples(GammaDistribution, n_components=2, X=obs_npy, state_names=['S1','S2',], name='My First Model', verbose=True)
The verbose training output reports an improvement of "nan" and ends almost immediately.
I got a feeling that there was some problem with my data - but I was surprised that the model did learn the hidden state transition matrix correctly. The matrix below is pretty accurate - that was the basis of
I was thinking - perhaps the model did indeed correctly learn the parameters of the multi-variate gamma-distribution. However, when I checked the model definition - the parameters of the GammaDistribution were all NaN.
I was able to see some legitimate training improvement output when I switched from the GammaDistribution to either NormalDistribution or MultivariateGaussianDistribution - see below:
Why doesn't it work with the GammaDistribution ?