On Sun, Jul 24, 2011 at 9:25 AM, Svetlomir Kasabov < [email protected]> wrote:
> Hello, > > I consider using Mahout's implementation for Hidden Markov model (HMM) for > prediction, but I want to clarify some important questions before using it: > > > 1. I've read some literature about HMMs and in some sorces is written, that > HMMs can also handle continiuous values as input (and not only discrete > values). Can Mahout's implementation also handle such values ? My input data > is only continious. > Mahout's HMM implementation can only handle discrete values. You could sample your input to make it discrete. > 2. Can Mahouts HMM have many hidden markov chains? I don't know, if I use > the right terminology, but what I need is this HMM "architecture": > > X1----X1----X1----...X1 (Markov Chain for input parameter 1 => monitoring > X1's changes over time) > > X2----X2----X2----...X2 (Markov Chain for intput parameter 2 => monitoring > X2's changes over time) > > Y-----Y-----Y-----...Y (Output value's changes over time) > > I think this architecture would allow me to train and predict output Y > based on inputs X1 and X2. > If you look into the *definition* of HMM, the hidden sequence is drawn from only one set. The hidden sequence's transitions can be expressed as a joint probability p(s0, s1). Similarly the observed sequence has a joint distribution with the hidden sequence such as p(y0, s1) and so on. The hidden state transitions follow the Markov memorylessness property and hence form a Markov Chain. In your case, you are trying to model your problem assuming that there are two underlying state sequences affecting the observed output. This doesn't fit into the HMM's definition and you probably want something else. If you do want to fit your problem into the HMM framework, you need to condense the X1 and X2 sequences into a single set and then condition the Ys on it. > 3. Can we get output probabilities from the HMM for a concrete state? > Yes, after training, you can retrieve any of the trained model's distributions as a Mahout Matrix type and use get(row, col). Recent refactorings have also made it possible to print the trained model on screen. > > Many thanks in advance! > > Best regards, > > Svetlomir. > >
