问题
I had a question about how I can use gaussianHMM in the scikit-learn package to train on several different observation sequences all at once. The example is here: visualizing the stock market structure
shows EM converging on 1 long observation sequence. But in many scenarios, we want to break up the observations (like training on set of sentences) with each observation sequence having a START and END state. That is, I would like to globally train on multiple observation sequences. How can one accomplish this when using GuassianHMM? Is there a example to look at?
Thanks in advance
回答1:
In attached example you do
model.fit([X])
which is training on a singleton of observations, if you have multiple ones, for example X1,X2,X3 you can run
model.fit([X1,X2,X3])
in general for HMM implementation in scikit-learn you give it a sequence of observations S
model.fit(S)
来源:https://stackoverflow.com/questions/20445470/scikit-learn-hmm-training-with-set-of-observation-sequences