title: Input Output Hidden Markov Model Implementation in Python
body: <p>I am trying to implement Hidden Markov Models with Input Output Architecture but I could not find any good python implementation for the same.</p>
  
  <p>Can anybody share the Python package the would consider the following implementation for HMM.</p>
  
  <p>Allow continuous emissions.
  Allow functionality of covariates(i.e. Independent Variables in I/O HMM).</p>
  
  <p>At this moment, I am struggling to find the python implementation for the same.</p>
  
  <p>I could not find the relevant examples in hmmlearn.</p>
  
  <p>Here are few of the libraries that I have tested out:</p>
  
  <p>hmmlearn: hmmlearn allows to pass multiple features to emissions/observations but does not provide the support to include co-variates(i.e. Independent Variables). </p>
  
  <p>hmms: Does not support the functionality to add continuous emissions as well as does not support addition of Independent Variables.</p>
  
  <p>IOHMM: I was able to train the HMM Model using this library, but could not find the documentation to make predictions after training the model.</p>
  
  <p>Therefore, I am looking for the package that serves the purpose.</p>
  
  <pre><code>from IOHMM import UnSupervisedIOHMM
  from IOHMM import OLS, DiscreteMNL, CrossEntropyMNL, forward_backward
  
  SHMM = UnSupervisedIOHMM(num_states=3, max_EM_iter=200, EM_tol=1e-6)
  
  SHMM.set_models(model_emissions = [OLS(est_stderr=True)], 
                  model_transition=CrossEntropyMNL(solver='lbfgs'),
                  model_initial=CrossEntropyMNL(solver='lbfgs'))
  
  SHMM.set_inputs(covariates_initial = [], covariates_transition = [], covariates_emissions = [['Insulin']])
  
  
  SHMM.set_outputs([['Glucose']])
  
  SHMM.set_data([data])
  
  SHMM.train() 
  </code></pre>
  
  <p>I could not figure out how to get emission probabilities and sequence of hidden states after the above training.</p>