FactorialHMM, a Python package for fast exact inference in Factorial Hidden Markov Models
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Create LICENSE Aug 9, 2018
README.md Update README.md Oct 5, 2018
factorial_hmm.py Add implicit support for 3d observations Oct 17, 2018
factorial_hmm_test.py Reverse obs_given_hidden order Oct 8, 2018

README.md

FactorialHMM

FactorialHMM is a Python package for fast exact inference in Factorial Hidden Markov Models.

FactorialHMM is freely available for academic use. A specific license must be obtained for any commercial or for-profit organization or for any web-diffusion purpose.

Our package allows:

  • Simulating directly from the model
  • Simulating from the posterior distribution of states given the observations
  • Calculating the (Viterbi) sequence of states with the largest posterior probability
  • Calculating the Forward-Backward algorithm, and in particular likelihood of the data and the posterior probability (given all observations) of the marginal and joint state probabilities as well as additional HMM-related procedures.

The running time and space requirement of all procedures is linear in the number of possible states. This package is highly modular, providing the user with maximal flexibility for developing downstream applications.

Installation

Required Python 3+.

Simply download the factorial_hmm.py file, add its location to sys.path (e.g., sys.path.append(path_to_dir)), and import the library.

Prerequisites are numpy and scipy.

Comments are welcome at regevs@gmail.com or regev.schweiger@myheritage.com.

Usage

The full documentation is available at the Wiki section.