3.1.2. Permutation Entropy

Permutation Entropy (*Hperm*) was conceived by Bandt and Pompe as an entropy-based measure for measuring the *complexity* of a TS [23]. *Hperm* is based on the concepts of *H* and Symbolic Dynamics (SD). In contrast to *Hdist* and *Hspct*, *Hperm* does not ignore temporal information.

The SD carried to obtain *Hperm* consists of transforming TS data into a sequence of discrete symbols, i.e., length-L Ordinal Patterns (OP). These are produced by encoding consecutive observations contained in a sliding window of size *L*, *L* ≥ 2, into *permutations* determined by observations rank order in each window [20,34]. However, to determine the L-window, a Phase Space Reconstruction (PSR) needs to be carried out [28,35]. Such reconstruction employs two parameters—the embedding dimension *de* and the time delay *τ*. Formally, given a TS of the form *X* = *x*1, *x*2,..., *xt*|*xi* ∈ R, a point mapped to the reconstructed *de*-dimensional space is of the form *xj* = {*xt*, *xt*−*τ*, ... , *<sup>x</sup>*(*de*−<sup>1</sup>)*τ*}|*xj* ∈ *XR*, thus, *L* = (*de* − <sup>1</sup>)*<sup>τ</sup>*.

Once TS is mapped into this space, portrait permutations are obtained. A permutation *πj* ∈ Π is given by the permutation of indices (from 0 to *de* − 1), which puts the *de* values of a given *xj* into ascending sorted order. Notice that there are *de*! different permutations. Afterwards, the Permutation Distribution (PD), also known as *codebook*, is calculated by counting the relative frequency of each symbol. Analyzing the behavior of a TS by its PD has several advantages: it is invariant to monotonic transformations of the underlying TS, requires low computational effort, is robust to noise, and does not require knowledge of the data range beforehand [20,35].

Once the PD is estimated, *Hperm* is obtained such that

$$H\_{\rm perm} = -\sum\_{\pi\_j \in \Pi} \pi\_j \log\_a \pi\_{j\prime} \tag{8}$$

where Π is the set of all different *de* permutations. A cartoon of this process is shown in Figure 1C.

For convenience, *Hperm* can be normalized by dividing it by *loga*(*de*!) to constrain it to 0 ≤ *Hperm* ≤ 1. In this sense, a lower value of the normalized *Hperm* corresponds to more regular and deterministic process, whereas a value closer to 1 is observed in more random and noisier TS. Notice that *Hperm* is closely related to the Kolmogorov–Sinani (KS) entropy and equal to it when the TS is stationary. However, in contrast to KS entropy, *Hperm* it is computationally feasible to calculate *Hperm* for long L-windows [21,28,34].
