Efficiently Measuring Complexity on the Basis of Real-World Data

Permutation entropy, introduced by Bandt and Pompe, is a conceptually simple and well-interpretable measure of time series complexity. In this paper, we propose efficient methods for computing it and related ordinal-patterns-based characteristics. The methods are based on precomputing values of successive ordinal patterns of order d, considering the fact that they are “overlapped” in d points, and on precomputing successive values of the permutation entropy related to “overlapping” successive time-windows. The proposed methods allow for measurement of the complexity of very large datasets in real-time.


Motivation
Measuring the complexity of a system by observed time series is an important problem in different fields of research.One faces the problem, for instance, of distinguishing between different brain states on the base of EEG data.The complexity of a dynamical system can be measured by the well-motivated Kolmogorov-Sinai (KS) entropy [1], by the Lyapunov exponent, or by the correlation dimension [2], but it is often not easy to estimate these and similar quantities from finite real-world data.
In order to quantify complexity on the base of real-world data, Bandt and Pompe have introduced permutation entropy [3].It is based on the distributions of ordinal patterns, which describe order relations between the values of a time series.On the one hand, permutation entropy is strongly related to KS entropy.It coincides with KS entropy for piecewise strictly monotone interval maps [4] and is not less than KS entropy for many dynamical systems [5][6][7] (see also [8,9] for some new results in this direction and [10] for the discussion of two approaches to the permutation entropy with respect to KS entropy).On the other hand, permutation entropy is estimated by empirical permutation entropy, which is conceptually simple and algorithmically fast [3,11].Empirical permutation entropy also provides robustness with respect to noise [3,12].An important practical aspect of empirical permutation entropy is that one can compare by it complexities of different time series of a fixed length in a well-interpretable, standardized and simple way.
Justified theoretically and simple conceptually, empirical permutation entropy and different ordinalpatterns-based characteristics have been applied in various fields for analyzing real-world data: for detecting and visualizing EEG changes related to epileptic seizures (e.g., [13][14][15][16]), for distinguishing brain states related to anesthesia [17,18], for discriminating sleep stages in EEG data [19], for analyzing and classifying heart rate variability data [20][21][22][23], and for financial, physical and statistical time series analysis (see [10,12] for a review of applications).
Motivated by the good properties and many applications of empirical permutation entropy, we propose in this paper an efficient method of computing it and ordinal patterns faster than in [11], which allows for processing very large data sets in real-time.An efficient computation of ordinal patterns provides a fast calculation of not only empirical permutation entropy, but of many ordinal-patterns-based characteristics, such as, for example, the ordinal distributions itself [24] and derived measures [25], or transcripts, introduced in [26].The concept behind an efficient method is to use precomputed tables of successive values instead of computing ordinal patterns and the empirical permutation entropy in each time point.It is possible to precompute such successive values, because ordinal patterns "overlap" and, in fact, have some common information.Since successive values of the empirical permutation entropy are computed for successive overlapping time-windows, the possible "successive" entropies can also be precomputed.To motivate the method, let us give an example of processing epileptic EEG data by the empirical permutation entropy (data from The European Epilepsy Database [27]).Figure 1 illustrates how the empirical permutation entropy (bottom plot) reflects the epileptic seizure (marked in red and with a "head") in one-channel EEG data (upper plot).The processing of the depicted 20 min of EEG data, recorded at a sampling rate of 256 Hz, takes about 1 second in MATLAB R2012b.
In Section 2 we recall some notions from ordinal patterns analysis and consider how to compute ordinal patterns (by the method introduced in [11]) and how to compute the empirical permutation entropy from the distributions of ordinal patterns.More efficient methods for computing ordinal patterns and the empirical permutation entropy are introduced in Sections 3 and 4, correspondingly.In Section 5 we adapt the method to time series with a high frequency of occurrence of equal values.It is reasonable to take into account these equalities for data digitized with a low resolution, for example, for heart rate variability data as they are considered in [23].Finally, we present the comparison between two known methods of computing the empirical permutation entropy and the proposed method in Section 6.

Computing Ordinal Patterns and the Empirical Permutation Entropy
In this section we recall how to compute ordinal patterns by the method introduced in [11] and how to compute the empirical permutation entropy from the obtained distributions of ordinal patterns.

Ordinal Patterns
Let us start from an example of computing ordinal patterns (see Figure 2).We consider a part of a time series, consisting of 10 points, we fix a delay τ = 2, which indicates a distance between points in ordinal patterns, and an order d = 2, meaning ordinal patterns contain (d + 1) = 3 points.One can see that the blue ordinal patterns (in dashed line) "overlap" the previous black ordinal patterns in d = 2 points, and then the black ordinal patterns "overlap" the previous blue ordinal patterns in d = 2 points.This "overlapping" allows to use all information about order relations between points that can be obtained from a time series.By the same reason the ordinal patterns are computed starting from the point x 1 (the first, the third and the fifth ones) and then with a shift 1, starting from the point x 2 (the second, the fourth and the sixth ones).In the general case, ordinal patterns are computed starting from all initial times 1, . . ., τ .

Number Representation
In order to obtain the distribution of ordinal patterns, we assign numbers to each type of ordinal patterns.We consider here the enumeration of ordinal patterns introduced in [11], because it allows to compute them relatively fast.Originally, ordinal patterns of order d were defined as permutations of the set {0, 1, . . ., d} (see [3,11]).However, we define them here in the following way since that provides a simple enumeration of them (we refer for details to [11]).
Simply speaking, each i τ l (t) codes how many points from (x t , x t−τ , . . ., x t−(l−1)τ ) are not larger than x t−lτ .Note that we assume here occurrence of equal values in a time series quite rare.Indeed, the relation "equal to" is combined with the relation "greater than" in Definition 1. Regarding the time series with a high frequency of occurrence of equal values, we discuss modified ordinal patterns with considering equality in Section 5.
There are (d + 1)! ordinal patterns of order d, and one assigns to each of them a number from {0, 1, . . ., (d + 1)! − 1} in a one-to-one way by For example, all ordinal patterns of order d = 2 in their number representation are given in Table 1.Note that the ordinal patterns with the numbers (d + 1)(k − 1), . . ., (d + 1)k − 1 for each k = 1, 2, . . ., d! have the same relations between the last d points, because they have the same (i 1 , i 2 , . . ., i d−1 ) but a different i d .For instance, the ordinal patterns 0, 1, 2 (as well as the ordinal patterns 3, 4, 5) have the same relation between the last d = 2 points since they have the same i 1 and a different i 2 (see Table 1).We will use this property in Subsection 3.3.
(i τ 1 (t + τ ) is determined by Equation ( 1)).According to Equation (3) one needs only d comparisons and at most d incrementation operations to obtain the successive ordinal pattern when the current ordinal pattern is given [11].When counting ordinal patterns in their number representation (2), which is clearly more convenient than in the representation provided by Equation (1), one needs d multiplications more.

The Empirical Permutation Entropy
In order to reflect complexity changes in a time series in the course of time, the empirical permutation entropy is usually computed in sliding time-windows of a fixed size.Definition 2. By the empirical permutation entropy of order d and of delay τ of a time-window (x t , x t−1 , . . ., x t−M −dτ +1 ) at time t one understands the quantity has the ordinal pattern j} (with 0 ln 0 := 0).

Efficiently Computing Ordinal Patterns
In this section, we precompute successive ordinal patterns for each ordinal pattern.Using these values allows to compute ordinal patterns as numbers about two times faster than by Equations ( 2) and (3).This is important for the fast calculation of ordinal-patterns-based characteristics, in particular, the empirical permutation entropy.
For simplicity, we use here the number representation of ordinal patterns provided by Equation ( 2), but, in fact, the type of number representation is not substantial for the method, as we discuss in Subsection 3.3.

Precomputed Successive Ordinal Patterns
Given the ordinal pattern n τ d (t) there are (d + 1) possible successive ordinal patterns n τ d (t + τ ) since there are (d + 1) positions of the point x t+τ relative to the points from (x t , x t−τ , . . ., x t−(d−1)τ ).Ordinal patterns of order d = 2 and their successive ones are presented in Table 2.For example, for the ordinal pattern 0 there are three possible positions l = 0, 1, 2 of the next point and three possible successive ordinal patterns 0, 3, 4, respectively.
Let us denote the function determining successive ordinal patterns from a given one and from the position of the next value by φ d : where l indicates how many points from (x t , x t−τ , . . ., x t−(d−1)τ ) are greater than or equal to x t+τ , i.e., For example, the values of the function φ 2 , determining the successive ordinal pattern n τ 2 (t + τ ) from the given ordinal pattern n τ 2 (t), are presented in Table 3.One could determine the position l also as how many points from (x t , x t−τ , . . ., x t−(d−1)τ ) are less than or equal to x t+τ .The way of determining l is not substantial since it changes only the representation of the precomputed table.2).The precomputed tables of successive ordinal patterns of the orders d = 1, 2, . . ., 8 are given in the supplementary files "table1.mat",. . .,"table8.mat".

Size of the Precomputed Table
In order to efficiently compute ordinal patterns by Equation ( 5), one has to store (d + 1) values φ d (n τ d , l) for each of the (d+1)!ordinal patterns n τ d , i.e., (d+1)!(d+1) values in total.This is usually not a very large size since in many situations the orders d = 3, . . ., 7 are recommended for applications [3].
When using the enumeration (2) one can reduce the size of the table.Indeed, the ordinal patterns with the numbers (d + 1)(k − 1), . . ., (d + 1)k − 1 for each k = 1, 2, . . ., d! have the same successive ordinal patterns, because they describe the same relation between the last d points (Subsection 2.1).For example, the ordinal patterns 0, 1, 2 as well as the ordinal patterns 3, 4, 5 have the same successive ordinal patterns: 2).
Note that one can use enumerations of ordinal patterns different from (2) since only the correct correspondence between successive ordinal patterns is needed to efficiently compute them by Equation (5).

Efficiency of the Method
When efficiently determining the number n τ d (t + τ ) from n τ d (t) by Equation ( 5), one calculates only l by Equation ( 6).This is almost twice faster than calculating n τ d (t + τ ) by Equation ( 2), involving calculation (3) (see Table 4).

Efficiently Computing the Empirical Permutation Entropy
In this section, we consider the empirical permutation entropy, computed in sliding windows of a size M with maximal overlapping, i.e., the first point of the successive window is the second point of the previous one.The case with non-maximal overlapping is discussed in Subsection 4.3.

Precomputed Values
The successive windows (x t−1 , x t−2 , . . ., x t−M −dτ ) and (x t , x t−1 . . ., x t−M −dτ +1 ) differ in the points x t and x t−M −dτ , therefore the ordinal distributions in the windows differ in the frequencies of occurrence of the ordinal patterns n τ d (t) and n τ d (t − M ).In order to obtain the ordinal distribution of the successive window given the current one, one needs to substitute the frequency of the "outcoming" ordinal pattern q n τ d (t) by (q n τ d (t) − 1) and the frequency of the "incoming" ordinal pattern q n τ d (t) by (q n τ d (t) + 1): ) ln(q n τ d (t) + 1) Then the empirical permutation entropy h τ d (t) given h τ d (t − 1) is computed by , where (7) g(j) = 1 M (j ln j − (j − 1) ln(j − 1)) for j = 1, 2, . . ., M (8) If the "incoming" ordinal pattern coincides with the "outcoming" ordinal pattern, the ordinal distributions and the values of the empirical permutation entropy are the same for successive windows.

How can the Precomputed Table be Obtained: Size of the Precomputed Table
The precomputed table is obtained by computing (8) for all j = 1, 2, . . ., M , where M is the size of a sliding window.We have used a window size of two seconds in the example in the Introduction, which implies the size M = 2 • 256 = 512 of the precomputed table for a sampling rate of 256 Hz (see Figure 1).

Efficiency of the Method
Assuming that the distribution of ordinal patterns for the window (x t−1 , x t−2 , . . ., x t−M −dτ ) and h τ d (t − 1) are known, we compare the computation of h τ d (t) by Equation ( 4) and by Equation (7) (see Table 5).However, when using Equation ( 7) the empirical permutation entropy h τ d (t) for the first window is computed by Equation ( 4) since there is no precomputed value h τ d (t − 1).There are also no precomputed numbers of ordinal patterns for the first τ ordinal patterns.Computing their numbers by Equation ( 2) takes at most (4d − 1)τ operations (see Figure 5 for the scheme of the method).
In the case of non-maximal overlapping between windows, one can also compute the empirical permutation entropy by Equation ( 7), omitting "unnecessary" intermediate values h τ d (t).This is reasonable when the distance between the windows is not very large, and computing the empirical permutation entropy by Equation ( 4) implies more operations than by Equation (7).Roughly speaking, for a distance D < 3(d+1)!−2 2 between successive windows computing the empirical permutation entropy for the whole time series with use of sliding windows by Equation ( 7) is faster than by Equation (4).

Round-off Error
Successively calculating the empirical permutation entropy by Equation ( 7) provides an accumulation of round-off errors resulting from finite computer precision.One performs two operations in Equation (7) at each of W time points, which bounds the error by 2W ψ, where ψ is the machine precision and W is the length of a time series.For a relatively long time series one can recalculate the empirical permutation entropy by Equation (4) after some time, depending on the computer precision again, in order to avoid big accumulating errors and then continue calculations by Equation (7).For example, if is the maximal allowable error in computing the empirical permutation entropy, then one should recalculate the empirical permutation entropy by Equation (4) every 2ψ points.
For illustration purposes we present the round-off error of the empirical permutation entropy obtained for the example shown in the Introduction in Figure 4.One can see that the error is very small in relation to the values of the empirical permutation entropy (compare with Figure 1).

Method Summary
We summarize the proposed method of the efficient computation of the empirical permutation entropy in the following scheme (see Figure 5).As above, the size of a sliding window is denoted by M , the order of ordinal patterns by d, the delay by τ and the length of a time series by W .The MATLAB code for computing the empirical permutation entropy is given in Appendix B.1.Note that according to the scheme the efficiency of the proposed method after computing h τ d (M + dτ ) by Equation ( 4) depends only on a length of a time series W and does not depend neither on the order d, the window size M nor on the delay τ .

Efficiently Computing Modified Ordinal Patterns
This section is devoted to the efficient computation of modified ordinal patterns, which are adapted to the case of a time series with a high frequency of occurrence of equal values.In order to give an impression, we present all modified ordinal patterns of order d = 2 in Figure 6.Modified ordinal patterns are efficiently computed by using the idea of precomputed successive values similarly as it is done in Section 3. In Subsubsection 5.1.2.we propose a possible variant of their enumeration, which is natural from the computational point of view and provides a "short" precomputed table (as in Subsection 3.3).However, the way of enumerating modified ordinal patterns is also not substantial for computing them efficiently.

Modified Ordinal Patterns
There are many ways to code modified ordinal patterns.We code them naturally by determining for the vector (x t , x t−τ , . . ., x t−dτ ) the position of each point x t−lτ in relation to the points from the same vector.There are now three possibilities of the relation between two points: one point can be greater (less) than another one or equal to another one.
Let us indicate by b τ l (t), whether the point x t−lτ is equal to any point from (x t , x t−τ , . . ., x t−(l−1)τ ): Then the position I τ l (t) of the point x t−lτ in relation to the points from (x t , x t−τ , . . ., x t−(l−1)τ ) is calculated as In words, in order to determine the position of the point x t−lτ in relation to the points (x t , x t−τ , . . ., x t−dτ ) one counts how many values among the points in (x t , x t−τ , . . ., x t−dτ ) are less than x t−lτ and indicates whether the point x t−lτ is equal to any other point from (x t , x t−τ , . . ., x t−dτ ).

Successive Modified Ordinal Patterns
The proposed coding of modified ordinal patterns allows to compute the successive modified ordinal patterns in a simple way like in Subsubsection 2.1.2. .One obtains the successive modified ordinal pattern (I τ 1 (t + τ ), I τ 2 (t + τ ), . . ., I τ d (t + τ )) from the given one (I τ 1 (t), I τ 2 (t), . . ., I τ d (t)) by [compare with Equation ( 3)].One needs 3d comparisons and, at most, d additions to obtain the successive modified ordinal pattern when the current one is given.This property is useful for a relatively fast computing of modified ordinal patterns, when one cannot use the precomputed table by some reason.

Number Representation
We assign to each modified ordinal pattern a number from {0, 1, . . ., (2d+1)!!−1} (see Appendix A.1 for the proof and the details of enumeration): where !! stands for the odd factorial (2l − 1)!! = l j=1 (2j − 1).The modified ordinal patterns of order d = 2 in their number representation are given in Table 6.Note that there are "gaps" in the enumeration.For example, there are no modified ordinal patterns corresponding to the numbers 10 and 13 (see Appendix A.1 for details).Table 6.The modified ordinal patterns of order d = 2.

Precomputed Successive Modified Ordinal Patterns
Similar to the definition of the function φ d in Equation ( 5), we introduce here a function Φ d for determining the successive modified ordinal pattern N τ d (t + τ ) from the given one N τ d (t) and from the position L of the next point: The position L of the next point x t+τ is defined in a similar way as the entries I l for modified ordinal patterns, but it is calculated now in relation to the previous points (x t , x t−τ , . . ., x t−(d−1)τ ), not to the following points as in Definition 3. We have the term B coding whether the point x t+τ is equal to any point from (x t , x t−τ , . . ., x t−(d−1)τ ): Then the position L is calculated as For example, there are (2d + 1) = 5 possible positions of the next point x t+τ among the previous d = 2 points (see Figure 8).The successive modified ordinal patterns of order d = 2 are given in Table 7.One obtains the entries of the table by determining for each modified ordinal pattern of order d all possible successive modified ordinal patterns in dependence on the position L = 0, 1, . . ., 2d of the next point.

Size of the Precomputed Table
In order to use Equation ( 13) for the efficient computation of modified ordinal patterns one has to store (2d + 1)(2d + 1)!! values in the precomputed table, which are (2d + 1) values for each of position L = 0, 1, . . ., 2d for each of (2d + 1)!! numbers (although there are some empty entries, see for details Appendix A.1).
The enumeration ( 12) also allows to reduce the table size, because one can group modified ordinal patterns of order d according to the same relations between the last d points (see Table 7 for example).

Efficiency of the Method
Computing the number N τ d (t + τ ) from N τ d (t) by Equation ( 13) takes less than 3d comparisons and less than (d + 1) additions since it involves only the determination of the position L of the next point (see Table 8).One needs d multiplications and (d − 2) additions more, when computing successive modified ordinal patterns by Equation ( 11) without using the precomputed tables.(13) d + 1 0 ≤3d ≤4d + 1

Results
In this section, we compare by an example the efficiency of the proposed method of computing the empirical permutation entropy (see "PE.m" in Appendix B.1 for a realization in MATLAB) with the method introduced in [11] (see "oldPE.m" in Appendix B.2) and with one of the standard methods available in the Internet (see "pec.m" from [28]).We also present the time of computing the empirical permutation entropy for modified ordinal patterns (see "PEeq.m" in Appendix B.3).For estimating the execution time of MATLAB scripts we use the MATLAB function "cputime".The execution time of the methods are presented for illustration purposes, therefore we consider only one dataset.Note that for other datasets similar results are obtained.For a more reliable justification of the method see Tables 4, 5 and 8.
The methods are compared for a one-channel EEG dataset recorded at a sampling rate of 256 Hz.We consider the orders d = 3, 6, 7, the delay τ = 4 and different lengths of a time series.First, by the methods we compute the empirical permutation entropy of only one window (see Table 9) since the script realized by G. Ouyang is not adapted for sliding windows.The execution time is averaged over several runs.We compare now the methods of computing the empirical permutation entropy for a sliding window of 512 samples (2 seconds) for the same EEG dataset in dependence on the orders d = 3, 6, 7 and on the length of a time series (see Table 10).A maximal overlapping between the sliding windows and the delay τ = 4 are used.The execution time is averaged over several runs.

Conclusions
In this paper, we proposed an efficient method for computing ordinal patterns and computing the empirical permutation entropy.As one can see from Tables 9, 10, the proposed method is much faster than the known methods.This allows to measure the complexity of very large datasets by the empirical permutation entropy in real-time.The proposed method of efficient computing ordinal patterns can be applied not only to fast computing the empirical permutation entropy, but to fast computing other ordinal-patterns-based characteristics as well.The development of ordinal time series analysis is far from finished.Recently, new ideas, e.g., concepts for quantifying coupling of time series and the systems behind, are considered [26], partially with a higher computational effort than for the permutation entropy.Here, the presented method, with necessary adaptions, could be applied in order to minimize computational costs.

A.1. Number Representation of Modified Ordinal Patterns
Let us discuss first why the enumeration of modified ordinal patterns (12) has "gaps".Consider the modified ordinal pattern (I τ 1 (t), I τ 2 (t), . . ., I τ d (t)) of some vector (x t , x t−τ , . . ., x t−dτ ), where the vector (b τ 0 (t), b τ 1 (t), . . ., b τ d (t)) indicates equalities between the points of the vector as given by Definition 3. Note that the more r < l with b τ r (t) = 1 are, the less is the range of I τ l (t): That is the more points in (x t , x t−τ , . . ., x t−dτ ) are equal to any point, the less distinct values are in the vector.When enumerating modified ordinal patterns by Equation ( 12), we consider all possible combinations of I l ∈ {0, 1, . . ., 2l} for l = 1, 2, . . ., d, and, according to Equation ( 16), some of these combinations do not correspond to any modified ordinal pattern.That is why the enumeration has "gaps".
We show now that different modified ordinal patterns of order d have different numbers computed by Equation (12).Let us define a set I d of all vectors (I 1 , I 2 , . . ., I d ) as Note again that not all vectors from the set I d are modified ordinal patterns according to Equation ( 16), but all modified ordinal pattern of order d have different numbers computed by Equation (12).

A.2. The Amount of Modified Ordinal Patterns
One can see from Equation ( 16) that there are less than (2d + 1)!! modified ordinal patterns due to "gaps" in the enumeration.In order to find the actual amount of modified ordinal patterns observe that modified ordinal patterns of order d can be represented as Cayley permutations of a set {0, 1, . . ., d} (see for details [29]).Definition 4. A Cayley permutation of length d is a permutation p of d elements with possible repetitions from a set {x 1 , x 2 , . . ., x d } of d elements with an order relation, subject to the condition that if an element x i appears in p, then all elements a j < a i also appear in p. % c u r r e n t s h i f t 1 : τ i P a t = 1 ; % p o s i t i o n o f t h e c u r r e n t p a t t e r n i n t h e window f o r t = WS+Tau * d + 1 : L e n g t h % l o o p o v e r a l l p o i n t s posL = 1 ; % t h e p o s i t i o n l o f t h e n e x t p o i n t f o r j = t −dTau : Tau : t −Tau i f ( x ( j ) >= x ( t ) ) posL = posL + 1 ; end end nNew = p T b l ( prevOP ( i T a u ) * d1+posL ) ; % " i n c o m i n g " o r d i n a l p a t t e r n nOut = opW( i P a t ) ; % " o u t c o m i n g " o r d i n a l p a t t e r n prevOP ( i T a u ) = nNew ; opW( i P a t ) = nNew ; nNew = nNew + 1 ; nOut = nOut + 1 ; i f nNew ˜= nOut % u p d a t e t h e d i s t r i b u t i o n o f o r d i n a l p a t t e r n s opd ( nNew ) = opd ( nNew ) + 1 ; % " i n c o m i n g " o r d i n a l p a t t e r n opd ( nOut ) = opd ( nOut ) −1; % " o u t c o m i n g " o r d i n a l p a t t e r n ePE ( t ) = ePE ( t −1) + ( p e T b l ( opd ( nNew ) )−p e T b l ( opd ( nOut ) + 1 ) ) ; e l s e ePE ( t ) = ePE ( t −1) ; end i T a u = i T a u + 1 ; i P a t = i P a t + 1 ; i f ( i T a u > Tau ) i T a u = 1 ; end i f ( i P a t > WS) i P a t = 1 ; end end ePE = ePE (WS+Tau * d : end ) ;

Figure 1 .
Figure 1.The empirical permutation entropy reflects changes of the epileptic EEG data.

Figure 3 .
Figure 3. Computing the empirical permutation entropy in a sliding window.

Figure 4 .
Figure 4. Round-off error of the empirical permutation entropy computed in dependence on time.

Figure 5 .
Figure 5. Computational scheme of the method.

Figure 6 .
Figure 6.The modified ordinal patterns of order d = 2.
opd (opW( c n t ) + 1 ) = opd (opW( c n t ) + 1 ) + 1 ; f o r j = dTau+Tau+ i T a u : Tau :WS+dTau % l o o p f o r t h e f i r s t window c n t = c n t +Tau ; posL = 1 ; % t h e p o s i t i o n l o f t h e n e x t p o i n t f o r i = j −dTau : Tau : j −Tau i f ( x ( i ) >= x ( j ) ) posL = posL + 1 ; end end opW( c n t ) = p T b l (opW( c n t −Tau ) * d1+posL ) ; opd (opW( c n t ) + 1 ) = opd (opW( c n t ) + 1 ) + 1 ; end prevOP ( i T a u ) = opW( c n t ) ; end o r d D i s t N o r m = opd /WS; ePE (WS+Tau * d ) = −nansum ( o r d D i s t N o r m ( 1 : n P a t ) .* l o g ( o r d D i s t N o r m ( 1 : n P a t ) ) ) ; i T a u = 1 ; Definition 1.The delay vector (x t , x t−τ , . . ., x t−dτ ) is said to have the ordinal pattern

Table 1 .
The ordinal patterns of order d = 2.

Table 4 .
Efficiency of computing the ordinal pattern n τ d (t + τ ) from n τ d (t).

Table 5 .
Efficiency of computing the empirical permutation entropy h τ d (t).

Table 8 .
Efficiency of computing the modified ordinal pattern N τ d (t + τ ) from N τ d (t).

Table 9 .
Computing the empirical permutation entropy of one window by different methods (seconds).

Table 10 .
Computing the empirical permutation entropy of a time series in sliding windows by different methods (seconds).