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_predict(self, implementation):
      X = [[0], [1], [2]]
      h = self.new_hmm(implementation)
      state_sequence = h.predict(X)
      posteriors = h.predict_proba(X)
      assert_allclose(state_sequence, [1, 0, 0])
      assert_allclose(
          posteriors,
          [
              [0.23170303, 0.76829697],
              [0.62406281, 0.37593719],
              [0.86397706, 0.13602294],
          ],
          rtol=0,
          atol=1e-6,
      )
  
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 4 for calling the TestCategoricalAgainstWikipedia obj's underlying member method code with example usage: obj.test_predict(implementation) without return types