Skip to main content

Python code for hidden markov models

Project description

HMM provides python3 code that implements the following algorithms for hidden Markov models:

Forward: Recursive estimation of state probabilities at each time t,

given observation likelihoods for times 1 to t

Backward: Combined with Forward, provides estimates of state

probabilities at each time given _all_ of the observation likelihoods

Train: Implements Baum Welch algorithm which finds a local maximum of

likelihood of model parameters

Decode: Implements Viterbi algorithm for finding the most probable

state sequence

Implementations of the above algrithms are independent of the observation model. HMM enables users to implement any observation model by writing code for a class that provides methods for calculating the likelihood of an observation given a state and for reestimating model parameters given observations and state likelihoods.

HMM includes implementations of the following observation models:

IntegerObservation: Integers in a finite range

Gauss: Floats with state dependent mean and variance

GaussMAP: Like Gauss but uses maximum a posteriori probability estimation

MultivariateGaussian: Like GaussMAP but observations are vectors of floats

AutoRegressive: Like GaussMAP but with linear autoregressive forecast and Gaussian residual

Observation_with_bundles: Observations that can include classification data

I (Andy Fraser) restarted this project on 2021-01-22. I will rewrite the code for my book “Hidden Markov Models and Dynamical Systems”. This project contains general HMM code that is not specific to the book.

You can redistribute and/or modify hmm under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the file “License” in the root directory of the hmm distribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hmm4ds-0.0.6.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hmm4ds-0.0.6-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file hmm4ds-0.0.6.tar.gz.

File metadata

  • Download URL: hmm4ds-0.0.6.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.4

File hashes

Hashes for hmm4ds-0.0.6.tar.gz
Algorithm Hash digest
SHA256 2fa9585dfe081254328c5bdef5a408590a7d3153995dccd4cf7cb8e5da8ebef8
MD5 adc408ba77b78dba4ed37ba73ba97994
BLAKE2b-256 9f146db53c279be2bce9fa323e49579733585e4be0b70c9e16c0655b8b21bd8a

See more details on using hashes here.

File details

Details for the file hmm4ds-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: hmm4ds-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.4

File hashes

Hashes for hmm4ds-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 abb6d0ab3d2ccc889e64dea8d7a083d040524195c25a5e980b9045f090fed625
MD5 9fc406deae90470bcdfeafb68f8c4cf3
BLAKE2b-256 7a08d28007cba668ec2e1e970253eb949c1d2a2a28ce45b0bb2095fa4ad159f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page