title: Streaming version of hmmlearn.predict
body: <p>I'm using hmmlearn to fit a gaussian HMM. Something along the lines below:</p>
  <pre class="lang-py prettyprint-override"><code>model = GaussianHMM(
              n_components=4, random_state=100, covariance_type=&quot;diag&quot;,
              n_iter=100000).fit(train_set)
  </code></pre>
  <p>train_set is a matrix of features (10000x6) and looks like regular multivariate normal data.</p>
  <p>After I've trained it, and I call model.predict(test_set), I get what I expect - a sequence of 4 hidden states that's as long as the test data set. The test_data in question is around 500x6, say.</p>
  <p>Now I want to use this model in real-time (every 10 seconds). I can warm up the model by waiting until i have a sufficiently long sequence (say 100x6) and then call predict to get the viterbi ml estimate of the sequence but then I'd like to call a function that takes the current observed sample data and latest hidden state and gives me the ml estimate of the new hidden state.</p>
  <p>Note that this is not just the transition matrix - Ideally I'd want to somehow keep the state of the predict calc (viterbi) as a static calc (i.e it was yielded) and then just stream in the new sample and then get the new (ml estimate) hidden state.</p>
  <p>I couldn't find an easy way to do this (other than accessing the _viterbi protected class which I don't think the author intended)</p>
  <p>Any idea how to achieve this?</p>
  <p>Thanks</p>