class_docstr: Examples from Wikipedia:
  
  - http://en.wikipedia.org/wiki/Hidden_Markov_model
  - http://en.wikipedia.org/wiki/Viterbi_algorithm
class_docstr_tok: ["Examples","from","Wikipedia",":","-","http",":","\/\/en.wikipedia.org\/wiki\/Hidden_Markov_model","-","http",":","\/\/en.wikipedia.org\/wiki\/Viterbi_algorithm"]
code: def test_decode_viterbi(self, implementation):
      # From http://en.wikipedia.org/wiki/Viterbi_algorithm:
      # "This reveals that the observations ['walk', 'shop', 'clean']
      #  were most likely generated by states ['Sunny', 'Rainy', 'Rainy'],
      #  with probability 0.01344."
      h = self.new_hmm(implementation)
      X = [[0], [1], [2]]
      log_prob, state_sequence = h.decode(X, algorithm="viterbi")
      assert round(np.exp(log_prob), 5) == 0.01344
      assert_allclose(state_sequence, [1, 0, 0])
  
imports: import numpy
  from numpy.testing import assert_allclose
  import pytest
  from hmmlearn import hmm
  from .None import assert_log_likelihood_increasing, normalized
label_desc: Use image node_id 2 for calling the TestCategoricalAgainstWikipedia obj's underlying member method code with example usage: obj.test_decode_viterbi(implementation) without return types