pyhctsa.operations.symbolic.transition_matrix

pyhctsa.operations.symbolic.transition_matrix(y, how_to_cg='quantile', num_groups=2, tau=1)

Transition probabilities between time-series states. The time series is coarse-grained according to a given method.

The input time series is transformed into a symbolic string using an equiprobable alphabet of num_groups letters. The transition probabilities are calculated at a lag tau.

Related to the idea of quantile graphs from time series, cf. [1]

References

Parameters:
y : array-like

Input time series.

how_to_cg : str, optional

The method of discretization (currently ‘quantile’ is the only option)

num_groups : int, optional

number of groups in the course-graining

tau : int or str, optional

analyze transition matricies corresponding to this lag. We could either downsample the time series at this lag and then do the discretization as normal, or do the discretization and then just look at this dicrete lag. Here we do the former. Can also set tau to ‘ac’ to set tau to the first zero-crossing of the autocorrelation function.

Returns:

A dictionary including the transition probabilities themselves, as well as the trace of the transition matrix, measures of asymmetry, and eigenvalues of the transition matrix.

Return type:

dict