0

I am trying to fit HMMs in my dataset for modelling purposes. Using the hmm.GaussianHMM function of hmmlearn, I have fit a single HMM with 2-5 hidden states. My code looks like this:

HMMmodel = hmm.GaussianHMM(n_components=2, covariance_type="full", n_iter=2)
HMMmodel.fit(Sdata)

The above code is a GaussianHMM for 2 hidden states.

Now, if I want to fit another HMM in the same data alongside the existing HMM, how should I do it? So, I want to have two HMMs for my dataset with 2-5 hidden states for each HMM. Any resource or hints in this regard will be really useful.

sumitpal0593
  • 194
  • 1
  • 3
  • 18

1 Answers1

1
HMMmodel = hmm.GaussianHMM(n_components=2, covariance_type="full", n_iter=2)
HMMmodel.fit(Sdata)

HMMmodel2 = hmm.GaussianHMM(n_components=2, covariance_type="full", n_iter=2)
HMMmodel2.fit(Sdata)
Jon Nordby
  • 5,494
  • 1
  • 21
  • 50