pyhctsa.operations.entropy.permutation_entropy_complexity

pyhctsa.operations.entropy.permutation_entropy_complexity(y, m=2, tau=1)

Jensen-Shannon statistical complexity of ordinal patterns.

Computes the Bandt-Pompe ordinal-pattern distribution (as in permutation_entropy()) and pairs its normalized Shannon entropy with the Jensen-Shannon statistical complexity of Rosso et al. [1]: the entropy-complexity plane used to separate chaotic, stochastic and periodic dynamics that can look alike under entropy alone.

Entropy is near its extremes (0 or log(m!)) for both fully ordered and fully random sequences. The statistical complexity C = Q_J[P, P_uniform] * H[P] is instead close to zero at both those extremes and peaks for structured-but-disordered (‘chaotic’) ordinal-pattern distributions, a distinct axis of information from entropy alone. ‘hNorm’ reproduces the ‘normPermEn’ of permutation_entropy(). Port of hctsa’s EN_PermEnComplexity.

At m = 2 there are only two ordinal states, so H and C are both unimodal, symmetric functions of a single probability: they are then forced to be near-perfect reparameterizations of one another regardless of the input data, making ‘jsComplexity’ redundant with plain permutation entropy at that order. m = 3 is also largely redundant in practice; only m = 4 and m = 5 are registered in the default hctsa feature set.

References

Parameters:
y : array-like

The input time series.

m : int, optional

The embedding dimension (order of the ordinal patterns). Default is 2.

tau : int or str, optional

The time delay for the embedding: an integer, or a rule understood by get_tau() ('ac', 'ac1e', 'mi'). Default is 1.

Returns:

A dictionary containing:

  • ’hNorm’: the normalized Shannon entropy of the ordinal-pattern distribution, H[P] = S[P] / log2(m!), in [0, 1],

  • ’jsComplexity’: the Jensen-Shannon statistical complexity, C[P] = Q_J[P, P_uniform] * H[P], in [0, 1].

Both are NaN if the delay cannot be determined or the series is too short to embed (fewer than 5 embedding vectors).

Return type:

dict