Advertisement
amroamroamro

HMM viterbi

Jan 14th, 2017
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.40 KB | None | 0 0
  1. function states = my_dhmm_viterbi(obs, prior, trans, emit)
  2.   % Input
  3.   %  obs   : sequence of observations
  4.   %  prior : initial state probs
  5.   %  trans : transition matrix
  6.   %  emit  : emission matrix
  7.   % Output
  8.   %  states: sequence of states
  9.   %
  10.   % See: http://www.cs.ubc.ca/~murphyk/Software/HMM/hmm_usage.html
  11.   %
  12.  
  13.   V = multinomial_prob(obs, emit);
  14.   states = viterbi_path(prior, trans, V);
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement