我是隐马尔可夫模型 (HMM) 的新手,我现在正在尝试使用它进行数据预测。考虑一个以非均匀间隔采样的正弦波,我想使用这些数据来预测未来时刻的输出。我正在尝试将统计工具箱与 matlab 一起使用。
问题似乎是在给出的示例中,我需要一个发射矩阵和一个转换矩阵来生成一个 hmm 模型。但是仅基于我拥有的数据,我如何评估这些矩阵?以及如何根据我拥有的数据训练模型?
我是隐马尔可夫模型 (HMM) 的新手,我现在正在尝试使用它进行数据预测。考虑一个以非均匀间隔采样的正弦波,我想使用这些数据来预测未来时刻的输出。我正在尝试将统计工具箱与 matlab 一起使用。
问题似乎是在给出的示例中,我需要一个发射矩阵和一个转换矩阵来生成一个 hmm 模型。但是仅基于我拥有的数据,我如何评估这些矩阵?以及如何根据我拥有的数据训练模型?
I second slayton's answer.
The transition matrix is simply the list of probabilities that one state will go to another.
A hidden Markov model assumes you can't actually see what the state of the system is (it's hidden). For example, suppose your neighbor has a dog. The dog may be hungry or full, this is the dog's state. You can't ask the dog if it's hungry, and you can't look inside its stomach, so the state is hidden from you (since you only glance outside, at the dog, briefly each day you can't keep track of when it runs inside to eat or and how much it ate if so).
You know, however, that after it ate and became full, it will become hungry again after some time (depending on how much it ate last, but you don't know that so it might as well be random) and when it is hungry, it will eventually run inside and eat (sometimes it will sit outside out of laziness despite being hungry).
Given this system, you cannot see when the dog is hungry and when it is not. However, you can infer it from whether the dog whines. If it's whining, it's probably hungry. If it's happily barking, it's probably full. But just because it's whining doesn't mean it's hungry (maybe its leg hurts) and just the bark doesn't mean full (maybe it was hungry but got excited at something). However, usually a bark comes when it's full, and a whine comes when it's hungry. It may also make no sound at all, telling you nothing about its state.
So this is the emission matrix. The "hungry" state is more likely to "emit a whine", ditto for full and barks. The emission matrix says what you will observe in each given state.
If you use a square identity matrix for your emission matrix, then each state will always emit itself, and you will end up with non-hidden Markov model.
matlab 文档很好地描述了如何使用 HMM 的统计工具箱函数。“估计转换和发射矩阵”部分可能会让您指出正确的方向。