analog-garage / dimple

Dimple: Java and Matlab libraries for probabilistic inference
Apache License 2.0
80 stars 17 forks source link

Hidden semi markov model #7

Open gabriele76 opened 9 years ago

gabriele76 commented 9 years ago

Dear Dimple developers, is it possible to model hidden semi markov model with Dimple? Best Regards, Gabriele.

jgbernstein commented 9 years ago

It should be possible to model a semi-Markov process, but with some limitations. The best way may depend on the nature of the model and the choice of solver. For example, it should be possible to augment each state with another state variable representing the time since the last change, though these must be bounded. Another approach could be to have variables that directly refer to the time interval of each successive change in state (one such variable for each state change), where the maximum number of these is bounded (and some can point past the end of the chain). The graph may become loopy in these cases, in which case BP solvers will become less accurate and may become computationally impractical. If the original states are discrete and the first approach is used (augmenting each state), it may be possible to use the JunctionTree solver to perform exact BP, avoiding issues with loopiness. Whether this is practical depends on the specific domain sizes of the variables. In either structure, the Gibbs solver may be a practical alternative, since it isn't directly affected by loopiness. Let us know if you'd like to discuss further.