An(other) implementation of Explicit Duration Hidden Semi-Markov Models in Python 3
Project description
Warning: I made this repo when I was an undergrad, but was not even part of my undergrad project. Correctness of implementation not guaranteed, so use at your own risk.
edhsmm
An(other) implementation of Explicit Duration Hidden Semi-Markov Models in Python 3
The EM algorithm is based on Yu (2010) (Section 3.1, 2.2.1 & 2.2.2), while the Viterbi algorithm is based on Benouareth et al. (2008).
The code style is inspired from hmmlearn and jvkersch/hsmmlearn.
Implemented so far
- EM algorithm
- Scoring (log-likelihood of observation under the model)
- Viterbi algorithm
- Generate samples
- Support for multivariate Gaussian emissions
- Support for multiple observation sequences
- Support for multinomial (discrete) emissions
Dependencies
- python >= 3.5
- numpy >= 1.17
- scikit-learn >= 0.16
- scipy >= 0.19
Installation & Tutorial
Via pip:
pip install edhsmm
Via setup.py:
python setup.py install
Test in venv (Windows):
python -m venv venv
venv\Scripts\activate
pip install --upgrade -r requirements.txt
python setup.py install
Note: Also run pip install notebook matplotlib
to run the notebooks.
For tutorial, see the notebooks. This also serves as some sort of "documentation".
Found a bug? Suggest a feature? Please post on issues.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for edhsmm-0.2.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 002b5a193c339e5efea978b86dd011719d0c5ae74df49058b14c7f674b3c944f |
|
MD5 | 33c0bba24e8af81bef3d92c2444f92f4 |
|
BLAKE2b-256 | 9844be16cc59fefa358b5a828ffdf112e49fbee17d49237c30c88b99842a06fb |