tsseg.algorithms.hmm package
HMM — Hidden Markov Model state annotation via Viterbi decoding.
Description
Annotates a univariate time series with hidden-state labels using the Viterbi algorithm. The emission distributions, transition matrix and initial probabilities must be provided by the user (no EM learning). This makes the detector suitable as a baseline or when prior distributions are known.
Parameters
Name |
Type |
Default |
Description |
|---|---|---|---|
|
list / None |
|
List of callables (PDFs) for each hidden state. Default: two-state
Gaussian |
|
ndarray / None |
|
Row-stochastic transition matrix. Default: |
|
ndarray / None |
|
Initial state probabilities. Default: uniform. |
Usage
from tsseg.algorithms import HMMDetector
detector = HMMDetector() # default two-state Gaussian
labels = detector.fit_predict(X)
Implementation: Adapted from aeon. BSD 3-Clause.
Reference: Rabiner (1989), A tutorial on hidden Markov models and selected applications in speech recognition, Proceedings of the IEEE.