Wuming Gong
2006-Mar-22 15:18 UTC
[R] R package for computing state path using Viterbi algorithm
Dear list, This question is about Hidden Markov Model. Given a transition matrix, an emission matrix and a sequence of observed symbols (actually, nucleotide sequences, A, T, C and G), I hope to predict the sequence of state by Viterbi algorithm. I searched R repository for related packages. msm package has function viterbi.msm (as well as very good document), but it only works for continuous-time condition. Other two HMM related packages, hmm.discnp and repeats, however, does not have such a function (similar to "hmmviterbi()" function in MatLab). Is there an R package that implements such a function? Thanks, Wuming
Ingmar Visser
2006-Mar-22 15:40 UTC
[R] R package for computing state path using Viterbi algorithm
Wuming, Have a look at the depmix package that implements the viterbi algorithm for hidden markov models (in discrete time). The function to use is posterior(...). The package includes a manual with a number of examples. Hth, Ingmar> From: Wuming Gong <wuming.gong at gmail.com> > Date: Wed, 22 Mar 2006 23:18:54 +0800 > To: <r-help at stat.math.ethz.ch> > Subject: [R] R package for computing state path using Viterbi algorithm > > Dear list, > > This question is about Hidden Markov Model. Given a transition > matrix, an emission matrix and a sequence of observed symbols > (actually, nucleotide sequences, A, T, C and G), I hope to predict the > sequence of state by Viterbi algorithm. I searched R repository for > related packages. msm package has function viterbi.msm (as well as > very good document), but it only works for continuous-time condition. > Other two HMM related packages, hmm.discnp and repeats, however, does > not have such a function (similar to "hmmviterbi()" function in > MatLab). > > Is there an R package that implements such a function? > > Thanks, > > Wuming > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Spencer Graves
2006-Mar-27 03:04 UTC
[R] R package for computing state path using Viterbi algorithm
Have you tried www.bioconductor.org? If you are studying nucleatide sequences, I would think you might get better help from Bioconductor. If you've already tried that (and you haven't received replies I've missed), it looks like you've found an opportunity to develop new code. I hope that this relatively negative reply is better than the none that I've seen. best wishes, spencer graves Wuming Gong wrote:> Dear list, > > This question is about Hidden Markov Model. Given a transition > matrix, an emission matrix and a sequence of observed symbols > (actually, nucleotide sequences, A, T, C and G), I hope to predict the > sequence of state by Viterbi algorithm. I searched R repository for > related packages. msm package has function viterbi.msm (as well as > very good document), but it only works for continuous-time condition. > Other two HMM related packages, hmm.discnp and repeats, however, does > not have such a function (similar to "hmmviterbi()" function in > MatLab). > > Is there an R package that implements such a function? > > Thanks, > > Wuming > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html