Markov Chain

class pydtmc.MarkovChain(p, states=None)[source]

Defines a Markov chain with the given transition matrix.

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

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

Raises:

ValidationError – if any input argument is not compliant.