title: Hmmlearn classification usage
body: <p>I'm trying to learn a model with <a href="https://hmmlearn.readthedocs.io/en/latest/index.html" rel="nofollow noreferrer">hmmlearn</a> in order to make a classification on my dataset.
  The dataset have a list of sequences having different length. Each sequence consists of event emission. For example:</p>
  <pre><code>ID1: ['1', '10', '8', '15']
  ID2: ['1', '10', '8', '15', '156', '459', '256']
  </code></pre>
  <p>This is the code I'm using. I found a similar example <a href="https://hmmlearn.readthedocs.io/en/latest/tutorial.html#training-hmm-parameters-and-inferring-the-hidden-states" rel="nofollow noreferrer">here</a>.</p>
  <pre><code>    sequence_map = __load_df(file)
  
      x = []
      lengths = []
  
      for values in sequence_map.values():
          x.append(values)
          lengths.append(len(values))
  
      x = np.concatenate(x)
  
      model = hmm.GaussianHMM(n_components=2, algorithm='map', n_iter=1000, covariance_type=&quot;full&quot;).fit(x, lengths=lengths)
      predictions = model.predict(x, lengths)
  </code></pre>
  <p>I'm interested in classifying the event in two categories, so I choose <code>n_components=2</code>. <br>
  How I could now retrieve the class for each sequence in my dataset?</p>