# Permutation Entropy

The method of calculating permutation entropy is described in a number of publications [1-4]. The degree of disorder or uncertainty in a system can be quantified by a measure of entropy. The uncertainty associated with a physical process described by the probability distribution is related to the Shannon entropy

[latex] S[P] = – \displaystyle\sum_{i=1}^{M} p_i \ln p_i [/latex] (1)

The idea introduced by Bandt and Pompe was to construct the probability distribution using ordinal patterns from the time series [1]. This symbolic approach based on the relative amplitude of time series values is much more robust to noise and invariant to nonlinear monotonous transformations (e.g. measurement equipment drift) when compared with other complexity measures. This makes it particularly attractive for use on experimental data.

To obtain the ordinal pattern distribution one must choose an appropriate ordinal pattern length [latex]D[/latex] and delay [latex] \tau [/latex]. Since there are [latex]D![/latex] possible permutations for a vector of length [latex]D[/latex], the choice should be influenced by the length of the measured time series. It has been suggested that in order to obtain reliable statistics the length of the time series [latex]N[/latex] should be much larger than [latex]D![/latex] [5]. For practical purposes it is recommended to use values of [latex]D[/latex] between 3 and 7.

The delay [latex]\tau[/latex] is the time separation between values used to construct the vector from which the ordinal pattern is determined. Its value corresponds to a multiple of the signal sampling period. Changing this delay enables the complexity of your time series to be analyzed at different time scales.

For a given a time series, ordinal pattern length [latex]D[/latex]*,* and delay [latex]\tau[/latex], we consider the vector

[latex] s \rightarrow (x_{s-(D-1)\tau}, x_{s-(D-2)\tau},…, x_{s-\tau}, x_{s}) [/latex] (2)

At each time *s* the ordinal pattern of this vector can be converted to a unique symbol defined by

[latex] x_{s-r_0\tau} \geq x_{s-r_1\tau} \geq … \geq x_{s-r_{D-2}\tau} \geq x_{s-r_{D-1}\tau} [/latex] (3)

The ordinal pattern probability distribution required for the entropy calculation is constructed by determining the relative frequency of all the [latex]D![/latex] possible permutations [latex] \pi_i [/latex]. The normalized permutation entropy is then defined as the normalized Shannon entropy [latex]S[/latex] associated with the permutation probability distribution [latex]P[/latex],

[latex] PE_{\tau} [P] = \frac{S[P]}{S_{\max}} = \frac{-\sum_{i=1}^{D!} p(\pi_i) \ln p(\pi_i)}{\ln D!} [/latex] (4)

This normalized permutation entropy gives values , where a completely predictable time series has a value of 0 and a completely stochastic process with a uniform probability distribution is represented by a value of 1.

**References**

[1] C. Bandt, and B. Pompe, “Permutation entropy: A natural complexity measure for time series,” Phys. Rev. Lett. 88, 174102 (2002).

[2] J. P. Toomey, and D. M. Kane, “Mapping the dynamic complexity of a semiconductor laser with optical feedback using permutation entropy,” Opt. Express 22, 1713-1725 (2014).

[3] L. Zunino, O. A. Rosso, and M. C. Soriano, “Characterizing the hyperchaotic dynamics of a semiconductor laser subject to optical feedback via permutation entropy,” IEEE J. Sel. Top. Quantum Electron. 17, 1250-1257 (2011).

[4] M. C. Soriano, L. Zunino, O. A. Rosso, I. Fischer, and C. R. Mirasso, “Time scales of a chaotic semiconductor laser with optical feedback under the lens of a permutation information analysis,” IEEE J. Quantum Electron. 47, 252-261 (2011).

[5] M. Staniek, and K. Lehnertz, “Parameter selection for permutation entropy measurements,” Int. J. Bifurcation Chaos 17, 3729-3733 (2007).