How to use prior probability in inferencing from HMM for activity recognition? I am interested in modelling human activities using sensor data with HMMs and would like to incorporate prior knowledge during inference. The normal procedure is to model K different activities with K separate HMMs. To test an unknown sequence, compute its likelihood from each of the HMMs and the HMM with maximum value is assigned as the class label. This is all done under the assumption that priors over HMM are uniform. 
A problem can arise when one of the class is rare or unusual and its prior probability may be very low in comparison to other classes and therefore the uniform priors may not be a good assumption.  Therefore, I am interested in posterior probability and not just the likelihood to capture the combined effect. My observations are continuous (features extracted from sensor) and not discrete values. My questions are:


*

*Can inference be done using a bayesian network type approach that include multiplication of prior with likelihood? 

*In my case the prior will be the count of activities available per HMM. Can that be estimated using a dirichlet prior to avoid zero-count problem for rare class (assuming I approximate an HMM for a rare class). Does that make sense?

*The multivariate observation data is approximated using single gaussian (and not mixtures), in that case likelihood will be gaussian?, can it be mixed with dirichlet prior to compute posterior probability? or the likelihood is still multinomial as it represents K different outcomes from K different HMMs?
Sorry if I have mixed with some of the basic concepts, I am new and I seek guidance to move further.
 A: My first reaction is to wonder if there's not an easier way to do what you're trying to do here. Are these HMMs models where the parameters have already been selected and where you're just looking at observations from them? If that's the case, then I think that's just an MM but that's semantics. If it's not and you're trying to actively fit the parameters of these HMMs at the same time as you're determining posterior likelihood, then I have some doubts about whether what you're doing is going to work.
I'm assuming that you have already fit the parameters of each HMM representing the state transition probabilities and the output probabilities. If that's the case, then given a sequence of observed outputs (or actions, in this case) you can compute the likelihood from each of the HMMs and using a prior will work fine. 
As for point 2, the prior will be multinomial, not Dirichlet. You just need to state P(Class 1), P(Class 2) and so forth. If you want to put a prior on the prior, you can do that and in that case it would be Dirichlet but I doubt that's necessary. A Dirichlet prior is used when the outcome is multinomial, in your case the outcome data is generated based on a discrete mixture of Markov Models. If you want to have the parameters of the prior be a function of other data, you can do that. If you want it to be proportional to the count of activities available, that's fine. The best way to avoid problems from zero-occurring classes is just to add a small number like 1 to each of the counts.
On question 3, I'm not at all sure what you mean here. The multivariate observation data? I thought the observation was a sequence of actions? How would you approximate a sequence of discrete outputs using a single Gaussian? If you're truly using a Markov Model, the likelihood should be a sequential product of conditional probabilities, each of which should be multinomial. Technically this will be more like conditional likelihood than actual likelihood, but that will make your life a lot easier. But you can multiply that by the prior to get the posterior and choose the most likely among the posterior probabilities.
