Data Science Asked by Soon on January 31, 2021
I want to train a sequence classifier with Hidden Markov Model. The length of observation sequences is not fixed. I tried some HMM packages such as Matlab’s HMM toolbox and Kevin Murphy’s library. All of them seem to require the user to specify the size of transition probability matrix and emission probability matrix.
I understand that for a Hidden Markov Model (HMM), the sizes of the transition probability matrix and emission probability matrix are dependent on the number of hidden states and the length of observation sequence.
For example if:
states = ('Rainy','Sunny')
observations = ('walk', 'shop', 'clean')
The number of states is 2, the length of observation is 3. Then,
transition probability would be a 2×2 matrix. Whereas,
emission probability would be a 2×3 matrix.
What if the length of observation sequence is not fixed?
For example:
observation 1 = ('walk', 'shop', 'clean')
observation 2 = ('walk', 'shop', 'clean','eat pizza')
observation 3 = ('walk', 'shop', 'clean','drink beer','eat pizza')
...so on
What’s the size of emission probability matrix in this case? Or can I just make the observation sequence the same length by padding with zeros?
No worries, length of observation would help in training of model. longer the length, training for Forward-backward Algo/baum Welch algo would be better. But length of observation is nothing to do with forecasting. read my blog below-
http://machinelearningstories.blogspot.com/2017/02/hidden-markov-model-session-1.html
transition probabilities would give next hidden state. and from next hidden state you can get next observation.So number of observation would not matter as long as u have trained model( emission and transition probabilities). Also if are intrested to know in detail that how next state would be calculated, follow below article.
http://machinelearningstories.blogspot.com/2017_03_01_archive.html
Answered by Arpit Sisodia on January 31, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP