Scikit Learn HMM training with set of observation sequences

丶灬走出姿态 提交于 2021-01-27 06:13:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!