Permutation entropy revisited
Stuart J Watt, Antonio Politi

TL;DR
This paper introduces a generalized permutation entropy measure for time-series analysis that depends on two window lengths, providing insights into the structure of invariant measures and aiding in estimating Kolmogorov-Sinai entropy.
Contribution
It extends permutation entropy by incorporating a second window parameter, enabling a more detailed analysis of time-series dynamics and invariant measure structures.
Findings
The $w$-dependence reveals invariant measure structure.
The $L$-dependence aids in estimating Kolmogorov-Sinai entropy.
Partition structure becomes elongated with increasing $w$.
Abstract
Time-series analysis in terms of ordinal patterns is revisited by introducing a generalized permutation entropy , which depends on two different window lengths: , implicitly defining the resolution of the underlying partition; , playing the role of an embedding dimension, analogously to standard nonlinear time-series analysis. The -dependence provides information on the structure of the corresponding invariant measure, while the -dependence helps determining the Kolmogorov-Sinai entropy. We finally investigate the structure of the partition with the help of principal component analysis, finding that, upon increasing , the single atoms become increasingly elongated.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Permutation entropy revisited
Stuart J. Watt
Antonio Politi
Institute of Pure and Applied Mathematics, University of Aberdeen, Aberdeen, UK
Abstract
Time-series analysis in terms of ordinal patterns is revisited by introducing a generalized permutation entropy , which depends on two different window lengths: , implicitly defining the resolution of the underlying partition; , playing the role of an embedding dimension, analogously to standard nonlinear time-series analysis. The -dependence provides information on the structure of the corresponding invariant measure, while the -dependence helps determining the Kolmogorov-Sinai entropy. We finally investigate the structure of the partition with the help of principal component analysis, finding that, upon increasing , the single atoms become increasingly elongated.
time series, entropy, embedding, complexity, PCA, fractal dimension
I Introduction
The development of effective procedures to encode irregular time series is an important research topic, tightly related to the compression of information or, equivalently, to the identification and removal of irrelevant details within given signals. Powerful tools have been developed when the underlying model is known and it is low-dimensional. The state of the art is (unsurprisingly) much less satisfactory when either prior knowledge is not available, or the dynamics is high-dimensional. The reason can be traced back to the difficulty of explicitly partitioning the phase space into non-overlapping cells (atoms).
The approach proposed by Bandt and Pompe bandt02a is the most powerful, if not the only, zero-knowledge method that can be effectively implemented above dimension two. Chunks of trajectories (“windows” as we refer to them from now on) of length are encoded according to the corresponding ordinal pattern (see next section for a precise definition). The so-called permutation entropy is thereby determined from the probabilities of the different ordinal patterns. In this context, a partition atom corresponds to the smallest box which contains all trajectories encoded with the same ordinal pattern. The easiness of the procedure has allowed developing many applications in different fields (ranging from engineering, to medicine etc. cao04 ; weck15 ; masoller15 ).
An additional reason to work with is its relationship with the Kolmogorov-Sinai entropy , the most important indicator of dynamical complexity sinai09 . is a dynamical invariant, independent of the parametrization adopted to describe the underlying evolution. is expected to coincide with for sufficiently long window lengths, although the convergence is typically rather slow. Recently, it has been understood that the large deviations are “finite-size” effects associated with the window-length dependence of the partition induced by the ordinal encoding. These deviations can be substantially eliminated by introducing an effective permutation entropy , where is the spread among trajectories characterized by the same pattern, while is the dimension of the underlying attractor. turns out to be a very accurate proxy of politi17 .
In this paper, we revisit the concept of permutation entropy by introducing the dependence of on the window length used to encode the underlying trajectory, while is still used to determine the entropy growth rate. Explicit calculations of the (average) partition size confirm the intuition that the size is controlled by . This new approach allows decreasing the finite-size effects which affect the standard , without the need of determining the spread itself. The spread is nevertheless investigated with the goal of characterizing the way the phase-space is filled by the observed time series. This is done with the help of principal component analysis, by studying the scaling properties of the eigenvalues of the correlation matrix.
The paper is organized as follows. The general formalism is introduced in section 2. Section 3 is devoted to the implementation of the two-length entropy, while in Section 4, we discuss the spread of the trajectories encoded by the same symbolic sequence. Finally in section 5, we briefly discuss possible future directions.
II Formalism
Given the generic time series (we assume it to have been properly sampled - see Ref. kantz04 for a discussion), a meaningful characterization requires passing through three steps: (i) the time series must be embedded into a suitable phase space; (ii) the corresponding space has to be properly partitioned into non overlapping cells; (iii) the information contained in the symbolic sequences is computed for different lengths.
The first step is typically tackled by building an -dimensional space, made of the -tuples . Takens theorem ensures that the underlying attractor is correctly reproduced, provided that is large enough takens81 .
Once the window length has been set, the next step consists in partitioning the embedding space into cells of size , so that the time series can be encoded as a sequence of symbols, each symbol corresponding to a different cell. The Kolmogorov-Sinai entropy rate is then formally obtained as
[TABLE]
where the limit is taken to ensure that the encoding is one-to-one, i.e. to avoid that any two different, infinitely long, trajectories are encoded in the same way eckmann85 . If the partition is generating, this second limit is not needed. In general, there is no guarantee that a given partition is generating. Special approaches have been developed, which, however, work only in two dimensions grassberger85 ; christiansen97 .
In the context of permutation entropy, the -tuple is encoded as , where is the ordinal position of within the -tuple. For instance, the quadruplet is encoded as , meaning that the first element is the second smallest value, and so on. Accordingly, the phase space is automatically partitioned into cells, each containing all -tuples encoded in the same way. The cell size is nothing but the spread among sequences encoded in the same way; the spread depends on the symbolic sequence.
We now illustrate the process with reference to the Hénon map, for the standard parameter values and . In this case, the embedding dimension suffices to reproduce the behavior of the dynamical system. We consider and project the partition onto a two-dimensional space. More precisely, given a generic 6-tuple, obtained by iterating the Hénon map, we plot the last two coordinates of each 6-tuple.
The results are presented in Fig. 1. In the left panel we provide the standard representation of the Hénon attractor; in the right panel we plot the points belonging to 10 out of the 63 symbolic sequences obtained by iterating the map (notice that the maximum possible number of different sequences is, in principle, ). In the picture we see a large diversity of cell structures. In some cases the cells are very thin and quite elongated. There is also a large diversity in the corresponding frequencies that are only vaguely proportional to the cell size.
The beauty and, at the same time, the limit of permutation entropy is that depends on (actually decreases for increasing ). As a result, it is sufficient to take the limit , since it automatically implies . The relationship between and is advantageous when a quick analysis is required, since one has to deal with only one scaling parameter.
On the other hand, the dependence of on induces a dependence on as well. These finite-size corrections eventually vanish (in the limit ), but are typically non-negligible for the numerically accessible values. Moreover, the relationship between and might represent a hindrance whenever there is no actual need to increase the spatial resolution, while it would instead be worth considering longer temporal windows.
In this paper, we revisit the definition of , by introducing a second length, , used to encode the signal; this way one can independently control the resolution .
III Two-length approach
Given the -tuple , we start encoding the first elements as in the standard implementation of permutation entropy, according to their ordinal pattern. Next, we proceed by encoding each following element up to according to the ordinal position within the window . Given the pair of values, the maximum number of symbolic sequences of length is , a number much smaller than the number allowed by the standard approach (when ). This is an advantage whenever a given value provides a high-enough resolution to ensure a meaningful encoding.
Let us now denote with the probability (relative frequency) of the symbolic sequence of length , computed using an ordinal pattern of length . The corresponding generalized permutation entropy is thereby defined as,
[TABLE]
coincides with the standard permutation entropy introduced by Pompe. The incremental entropy
[TABLE]
is the variation of information required to characterise the time series, when the window length is increased by one unit for a fixed partition stucture (here and in the following, we assume that the sampling time is one unit - whenever this is not the case, one should divide the rhs by ). Eq. (2) generalizes the formula
[TABLE]
used in the context of the standard definition of permutation entropy.
In Fig. 2, we compare the two quantities with reference to the Hénon map. There, we see that for increasing (and ), converges faster than to , which coincides, in this case, with the positive Lyapunov exponent of the map, .
performs better than , since it corresponds to a Markov process (of order ), while is a hybrid observable, being the difference between two terms, and , which refer to different partitions and thereby to a different symbolic encoding.
For those researchers who do not want to engage themselves in the implementation of the full two-length approach, they can obtain a genuine and correct first-order Markov approximation by proceeding as follows. Let denote the conditional probability to observe the sequence after shifting forward the -tuple (encoded by ) by one time unit. can be easily estimated by determining the fraction of observed transitions.
Let us then introduce the recursive relation
[TABLE]
where is a vector of probabilities (i.e. with sum-1 positive entries). If the underlying dynamics were a memory-1 Markov process, the numerically determined components would represent a fixed point of the above relation. In general, this is not the case. One can, nevertheless iterate the above equation, (starting from a generic initial condition) until a fixed point is obtained, i.e. a vector that is left invariant by the above transformation.
The corresponding entropy
[TABLE]
coincides by construction with the first order Markov approximation of the permutation entropy.
We conclude this section by discussing the dependence of on for fixed . As is kept constant, it means we always refer to the same embedding dimension . The variation of the entropy is therefore due to the refinement of the partition implicitly induced by . In other words, the entropy variation is the kind of observable that is computed when a fractal dimension is being determined within a given embedding space kantz04 .
In order to give direct evidence of this dependence, we have estimated the spread associated to each symbolic sequence, by computing the standard deviation of the last variable in the corresponding -tuple (in other words, we have followed the same strategy adopted in Ref. politi17 ). The logarithm of the spread has been then averaged over all symbolic sequences for a given value of and . The variation of with is plotted in Fig. 3, where, instead of referring to itself, we treat as the independent variable (for ). There, we see that the entropy increases with the logarithm of , as expected since upon increasing , the resolution used to partition a space of dimension increases as well. A fractal structure would imply a linear growth as indeed seen in Fig. 3, where the slope (from a fit over the largest -values, i.e. smallest -values) gives an exponent approximately equal to 1.5, relatively close to, but different from, the fractal dimension of the Hénon map, .
We suspect that the quantitative difference is to be attributed to the fact that the cells induced by the ordinal patterns are not isotropic (i.e. characterized by a single linear size), as implicitly assumed in the definition of the fractal dimension. We elaborate more on this point in the next section.
IV Partition structure
In the previous section we have shown that it is possible to improve the characterization of a complex time-series by generalizing the encoding strategy and including the spread among equally-coded -tuples into the analysis.
In this section we analyse the distribution of points within each partition atom with the help of the principal component analysis (PCA), alias orthogonal decomposition broomhead86 . PCA is a linear tool and, as such, cannot provide an accurate representation of an invariant measure distributed over a nonlinear manifold. Nevertheless, if the analysis is restricted to tiny regions, such as the atoms of the partition, the nonlinear effects are relatively smaller and the outcome more meaningful. This approach has been already implemented in past studies of the fractal dimension of high-dimensional systems politi92 , with reference to a predetermined homogeneous partition. Here we consider the atoms induced by the ordinal representation, referring to the Hénon map, for . PCA consists in first computing the covariance matrix , where denotes the th component of an -tuple and the average is performed over all points lying within the same cell (i.e. encoded in the same way). The resulting eigenvalues represent the variance of the distribution along the so-called principal axes (the eigenvalues are assumed to be ordered from the largest to the smallest ones). Given such information, we further average the logarithm of for each given over all cells (more precisely, we consider the most populated ones to avoid including -values of poorly populated cells). The outcome is presented in Fig. 4, using a logarithmic scale (see the black solid curve at the bottom of the figure).
If one could neglect the curved nonlinear structure of the underlying attractor, only two eigenvalues should be different from zero (due to the two-dimensional nature of the Hénon map), while the remaining four eigenvalues should strictly vanish. Any deviation from zero of the third to sixth eigenvalue is therefore a manifestation of nonlinear effects over the scale of the cell size. In practice we see that all six eigenvalues are different from zero although their amplitude decreases very rapidly with the index (see the bottom solid curve).
In order to interpret this outcome, we turn our attention to a simple case, that can be handled analytically. We consider a single cell in a three-dimensional space (i.e. we assume ), filled by statistically independent triplets. Each triplet is generated by iterating twice the recursive relation , starting from a randomly chosen initial condition , uniformly distributed within the interval . Averages are then performed over different choices of (rather than being time averages). The resulting triplets are by definition aligned along a one-dimensional pseudo-parabolic curve. The elements of the covariance matrix can be determined analytically by performing suitable integrals and one can also obtain analytical expressions for the three eigenvalues. Rather than reporting the resulting cumbersome expressions, we plot the values in Fig. 5 for different values in doubly logarithmic scales (see full circles, crosses and triangles). Additionally, we superpose the expected scaling behavior, as obtained from a perturbative calculation, which yields , , and and exhibit a very good agreement with the numerical results.
In practice, the (quadratic) nonlinearity of the initial set of points induces nonzero eigenvalues (besides the first one). Interestingly, the higher the order of the eigenvalue, the smaller its size. This means that the eigenvalues decrease exponentially with , the decay rate being approximately (actually, it might be even larger, because of the multiplicative contribution of the prefactors). In other words, in the presence of weak nonlinearities (i.e. small ), PCA acts as a sort of perturbative expansion, the eigenvalues being a sort of probes which detect nonlinearities of increasing order.
Returning back to the Hénon map, it is resasonable to interpret the pseudo-exponential behavior of the eigenvalues reported in Fig. 4 as a manifestation of the nonlinear structure of the two-dimensional manifold containing the Hénon attractor. Interpretative doubts, however, persist about the value of the first two eigenvalues, which both correspond to directions actually spanned by the invariant measure. In order to partially clarify this point, we have computed
[TABLE]
is, by definition, larger than 1; it measures the degree of anisotropy of the cells induced by the ordinal patterns. In Fig. 3, we plot for the same and values used in the computation of (see triangles). Its divergence for , shows that the cells are increasingly elongated. We suspect that this might be the origin of the overestimation of the fractal dimension. A more quantitative analysis is however required to relate the anysotropy of the covering with the scaling behavior of the corresponding entropy.
We finally briefly explore the role of observational noise. In Fig. 4, we report the six eigenvalues for increasing level of noise. On the one hand, the noise has an obvious implication: it induces a saturation of the exponential-like decrease: the smallest eigenvalue approximately scales as , where here is the noise amplitude. On the other hand, we see a counterintuitive phenomenon: the average leading eigenvalue decreases upon increasing . This effect is presumably due to changes in the symbolic representation that more likely occur in certain regions of the phase space than in others.
V Conclusions and open problems
In this paper, we have revisited the definition of permutation entropy by generalizing the approach proposed in Ref. bandt02a with the introduction of a second window-length which allows controlling the partition size. This strategy increases the flexibility of the ordinal-pattern analysis of generic time-series; in particular, if combined with the measure of trajectory spreading, it allows extracting additional information on the structure of the invariant measure and to have hints on the presence of noise.
We have exclusively based our analysis of a prototypical example of low-dimensional chaos: the Hénon map. It is certainly desirable to extend the method to higher dimensions: this is, in fact, one of the greatest challenges in the analysis of realistic time series. As a preliminary step in this direction, here we present results for the so-called generalized Hénon map (GH): . This model has been already discussed in Ref. politi17 , where it was found to be relatively nasty (exhibiting a rather slow convergence, even compared to the higher-dimensional attractor generated by the Mackey-Glass equation). For and , the GH map has two positive Lyapunov exponents so that the KS entropy is equal to 0.1756 (as from the sum of the first two Lyapunov exponents).
The results presented in Fig. 6 confirm that the two-length approach is superior to the computation of the standard permutation entropy. However, the convergence to the asymptotic value is slower and, more important, it seems to follow a weird pattern. In fact, smaller values seem to yield better results: compare, for instance, full circles () to triangles (). As it can be seen from the inset, where the deviation from the asymptotic value is plotted versus in doubly logarithmic scales, all sets of measurement are compatible with the final value. The reason of the lower performance of the supposedly more accurate partitions need to be further clarified. Anyway, this “anomalous” scenario is consistent with the slowness of the convergence reported in Ref. politi17 .
Altogether, the method proposed in this paper is significantly more accurate than the standard one, but there are many issues that require additional investigations: what is the reason for the slow convergence exhibited by the GH map? Is it a peculiarity of the model itself, or a general feature of some broad class of high-dimensional dynamics? Moreover, can we quantify the effect of noise so as to distinguish genuine deterministic from stochastic contributions?
Acknowledgements.
One of us, (SJW), wishes to acknowledge financial support from the Carnegie Trust for his summer project.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1(1) C. Bandt and B. Pompe, Phys. Rev. Lett. 88 , 174102 (2002).
- 2(2) Y. Cao, W. Tung, J.B. Gao, V.A. Protopopescu, and L.M. Hively, Phys. Rev. E 70, 046217 (2004).
- 3(3) P.J. Weck, D.A. Schaffner, M.R. Brown, and R.T. Wicks, Phys. Rev. E 91 , 023101 (2015).
- 4(4) C. Quintero-Quiroz, S. Pigolotti, M.C. Torrent, C. Masoller, New J. Phys. 17 , 093002 (2015).
- 5(5) Ya. Sinai, Scholarpedia 4 (3), 2034 (2009).
- 6(6) A. Politi, Phys. Rev. Lett. 11 144101 (2017).
- 7(7) H. Kantz and Th. Schreiber, Nonlinear time series analysis , (CUP, Cambridge 2004).
- 8(8) F. Takens, in Dynamical Systems and turbulence , D.A. Rand and L.-S Young eds., 366 (Springer, London 1981).
