用于实时应用的维特比算法
我知道给定一个 HMM 和一个观察,维特比算法可以猜测产生该观察的隐藏状态序列。但是如果你想实时使用它呢?我的意思是一步步找到隐藏状态。每当输入上有一个观察符号时,就会猜测一个隐藏状态,而不知道接下来的整个观察序列。 我想将其用于实时运行的音频应用程序,因此观察结果将是每个时间帧的音频特征值的序列。
I know that given an HMM and an observation, Viterbi algorithm can guess the hidden states sequence that produce this observation. But what about the case you want to use it real-time? I mean finding the hidden states step by step. Every time an observation symbol is on the input, a hidden state is guessed, without knowing the whole observation sequence that's coming next.
I want to use that for an audio application that is running in real time so the observation will be a sequence of values of an audio feature at each time frame.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有兴趣预测时间 T 的隐藏状态是什么,当您看到观察 O_T 时,您就有数据 O_1, ..., O_{T-1}, O_T。现在最可能的状态是向前向后找到的,其中向后变量只是 1,因为我们无法预见未来。总之,我们有 P(我们在时间 T 处于隐藏状态 i) = \alpha_T(i) / P(O_1, ..., O_T | \lambda),其中 P(O_1, ..., O_T| \ lambda) = \sum_{i=1}^n \alpha_T(i)。那么 P 的所有 i 的最大索引(我们在时间 T 处于隐藏状态 i)将是您的隐藏状态。
请参阅http://courses.media.mit.edu/ 2010fall/mas622j/ProblemSets/ps4/tutorial.pdf 的正式表示法。
如果这就是您想要的,或者您有其他想法,请告诉我。如果您只是想实时找到最佳的状态序列,只需计算 alpha 变量,无需展望未来。
If you are interested in predicting what the hidden state is at time T, when you see the observation O_T, then you have data O_1, ..., O_{T-1}, O_T. Now the most likely state is found with forward backwards, where the backward variable is simply 1, because we can't see into the future. In summary, we have P(We are in hidden state i at time T) = \alpha_T(i) / P(O_1, ..., O_T | \lambda), where P(O_1, ..., O_T| \lambda) = \sum_{i=1}^n \alpha_T(i). Then the max index over all i's of P(We are in hidden state i at time T) will be your hidden state.
Please refer to http://courses.media.mit.edu/2010fall/mas622j/ProblemSets/ps4/tutorial.pdf for the formal notation.
Please let me know if this is what you were after, or if you had something else in mind. If you just wanted to find the best sequence of states in realtime, just compute the alpha variables, no need to look into the future for that.