State Spaces SubPackage
This subpackage implements state space functionality
transitionMatrix.statespaces.statespace module
StateSpace holds information about the stochastic system state space
- class transitionMatrix.statespaces.statespace.StateSpace(definition=None, sticky=False, absorbing=None, originator=None, full_name=None, cqs_mapping=None, transition_data=None)[source]
Bases:
objectThe StateSpace object stores a state space structure as a List of tuples The first two elements of each tuple contain the index (base-0) and label of the state space respectively.
Additional fields reserved for further characterisation
- [(index 1, label 1, optional, optional, …),
(index 2, label 2, optional, optional, …)]
Todo
Implement Absorbing States
Todo
Implement in estimators
- cqs_map(label)[source]
Produce a CQS for a given input label (the cqs_mapping dictionary must exist)
- validate_dataset(dataset, labels=None)[source]
Check that a dataset column is consistent with a given state space. The following tests are implemented
1: all the states in dataset exist in the state space description (error otherwise) 2: all the states in state space exist in dataset (warning otherwise) 3: TODO successive states for the same entity are different, unless the Sticky flag is True
- Parameters:
dataset – the dataset to test
labels – the labels of the state space
- Returns:
a list of validation messages