如何使用隐马尔可夫模型进行未来预测

时间:2012-12-13 12:08:16

标签: sequence prediction hidden-markov-models

我有许多可变长度的序列。对于这些我想训练一个隐藏马尔可夫模型,我想稍后用它来预测(部分)序列的可能延续。到目前为止,我已经找到了两种使用HMM预测未来的方法:

1)幻觉延续并获得持续序列的可能性。选择具有最高可能性的那个作为您的预测。这种方法需要明确知道持续的可能值。

2)使用具有(部分)序列的维特比算法来获得最可能的隐藏状态序列。获取该序列中最后隐藏状态的发射分布并预测例如该分布的平均值(通常是高斯分布)。

现在我的问题是:是否还有其他可能更有原则性的方法来预测使用HMM的未来?

谢谢!

1 个答案:

答案 0 :(得分:0)

The Markov assumption in an HMM states that the state at time T+1 is independent of all states prior to T, conditioned on T.

Your option 2 is close to what I would suggest, except that you are using the Maximum likelihood assignment to the last state. Instead, calculate the distribution on the hidden state of the last item in the sequence. This amounts to replacing the "maxes" with "sums" in the Viterbi algorithm. (See https://www.coursera.org/course/pgm, and search for the "sum-product" algorithm, otherwise known as Belief Propagation).

Then, to sample the future, what you do is first sample the last state, given its distribution. Then sample the next hidden state, using the transition matrix and repeat ad nauseum. Since you have no actual observations after the last point in the sequence, you are sampling from a markov chain. This will get you samples of the future, given everything you know of the partial sequence. The reason this is different from Viterbi is that even the most likely assignment to the hidden variables of the partial assignment could have low likelihood. By using the entire distribution on the last state, you can get a much better estimate of the following (unobserved future) states.