Python Implementation of Viterbi Algorithm
Here’s mine. Its paraphrased directly from the psuedocode implemenation from wikipedia. It uses numpy for conveince of their ndarray but is otherwise a pure python3 implementation. import numpy as np def viterbi(y, A, B, Pi=None): “”” Return the MAP estimate of state trajectory of Hidden Markov Model. Parameters ———- y : array (T,) Observation state … Read more