This packages provides an implementation of Hidden Markov Models (HMMs) with tied states and autoregressive observations, written in Python. For HMM recursions, the C implementations of the hmmlearn package are used. Evaluation of the likelihood function and the maximization of the expected complete data log-likelihood is implemented in autograd, to allow quick development of novel models.
Important: The code in this repository is still experimental, and APIs are subject to change without warning.
As of now, this package is not installable via pip. Instead, clone the current version from git:
$ git clone https://github.com/mackelab/autohmm.gitThe dependencies are listed in requirements.txt. If you are using pip, you can install the dependencies through:
$ pip install -r requirements.txtTo install autohmm, call make or:
$ python setup.py installimport numpy as np
from autohmm import ar
model = ar.ARTHMM(n_unique=2)
model.mu_ = np.array([2.0, -2.0])
model.var_ = np.array([0.25, 0.25])
samples, states = model.sample(n_samples=500)An early stage version of the documentation is available at: http://www.mackelab.org/autohmm/