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 complexityC = 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’ ofpermutation_entropy().At
m = 2there 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 = 3is also largely redundant in practice; onlym = 4andm = 5are registered in the default 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', or the rank-based'ac-rank','ac1e-rank','mi-rank', with which the result is unchanged by a strictly increasing transformation of the series). Default is 1.
- Returns:¶
A dictionary containing:
’hNorm’: the normalized Shannon entropy of the ordinal-pattern distribution,
H[P] = S[P] / log2(m!), nominally in [0, 1],’jsComplexity’: the Jensen-Shannon statistical complexity,
C[P] = Q_J[P, P_uniform] * H[P], nominally in [0, 1].
Both are delete-one jackknife estimates computed from the pattern counts (see
permutation_entropy()for the bias being removed): ‘hNorm’ of the entropy and ‘jsComplexity’ of the whole productC, which also captures the covariance of its two factors. Being nearly unbiased at the boundary of the range, ‘hNorm’ can exceed 1 and ‘jsComplexity’ can be slightly negative for short series (for example, for noise at a few hundred points); they are not clipped, and no minimum length beyond 5 embedding vectors is imposed.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