Hidden Markov Model

class pydtmc.HiddenMarkovModel(p, e, states=None, symbols=None)[source]

Defines a hidden Markov model with the given transition and emission matrices.

Parameters:
  • p (Union[ndarray, spmatrix]) – the transition matrix.

  • e (Union[ndarray, spmatrix]) – the emission matrix.

  • states (Optional[List[str]]) – the name of each state (if omitted, an increasing sequence of integers starting at 1 with prefix P).

  • symbols (Optional[List[str]]) – the name of each symbol (if omitted, an increasing sequence of integers starting at 1 with prefix E).

Raises:

ValidationError – if any input argument is not compliant.