**3. Methods**

### **3.1 Univariate measures**

Many different methods for computing the complexity of time series have been defined and used successfully to analyze EEG data (Chen et al., 2009; Kuusela et al., 2002). Sample entropy, a measure of nonlinear time series complexity, was significantly higher in certain regions of the right hemisphere in pre-term neonates that received skin-to-skin contact than in those that did not, indicating faster brain maturation (Scher et al., 2009). Sample entropy has also been used as a marker of brain maturation in neonates (de la Cruz et al., 2007) and was found to increase prenatally until maturation at about 42 weeks, then decreased after newborns reached full term (Zhang et al., 2009). A study of the correlation dimension (another measure of signal complexity) of EEG signals in healthy subjects showed an increase with aging, interpreted as an increase in the number of independent synchronous networks in the brain (Stam, 2005).

Intuitively, complexity is associated with structural richness, depth, patterns upon patterns, incorporating correlations over multiple spatio-temporal scales (Costa et al., 2005b). There is no consensus on a definition of complexity, but algorithms have been developed to attempt to give meaning to complexity. In the context of time series analysis, the concept of entropy is relevant. The use of entropy measures to describe the information content of time series began with the publication of Shannon's Mathematical Theory of Communication (Shannon and Weaver, 1949). In an intuitive sense, information is a measure of the difference in uncertainty before and after a measurement. In the context of time series, information is related to the predictability of the series. Entropy is a mathematical function of the probability that the next point in a sequence or time series will be a certain values, given the previous (Baddeley, 2000). Several different entropy measures can be defined algorithmically, including Shannon entropy, spectral entropy, approximate entropy, Lempel-Ziv complexity and sample entropy (Sabeti et al., 2009), each with certain advantages for particular time series characteristics (length, amount of noise, for example). The sample entropy has been used for a number of investigations of physiological signals. Changes in sample entropy appear to correlate with aging and pathological conditions in the context of cardiac health (Bruce et al., 2009; Costa et al., 2008; Norris et al., 2008) and for normal brain development (Zhang et al., 2009) and to distinguish certain mental disorders such as schizophrenia (Sabeti et al., 2009; Takahashi et al., 2010).

The multiscale entropy (MSE) analysis is one method for computing the complexity of a time series that builds on the sample entropy and expands the concept. It has been used to analyze a number of physiological processes (Costa et al., 2005b; Hornero et al., 2009; Norris et al., 2008; Takahashi et al., 2010). The multiscale entropy algorithm incorporates two steps. The first is a coarse-graining procedure that uses successive averaging of a time series to create new coarse-grained time series. For a window size τ, τ = 1, 2, … j, the jth coarse-grain series, y<sup>τ</sup> j, is computed by averaging non-overlapping windows:

$$\mathbf{y}\_j^{\tau} = \frac{1}{\pi} \sum\_{i=(j-1)\tau+1}^{j\tau} \mathbf{x}\_i \tag{1}$$

where xi is the original time series of length N and τ is the scale factor satisfying 1< τ < N/τ. A schematic illustration of this process is shown in equation 2.

$$\begin{array}{cccccccccc} \text{Scale 2:} & \mathbf{x\_{1}} & \mathbf{x\_{1}} & \mathbf{x\_{1}} & \mathbf{x\_{4}} & \mathbf{x\_{5}} & \mathbf{x\_{6}} & \mathbf{x\_{7}} & \mathbf{x\_{8}} & \mathbf{x\_{9}} & \mathbf{x\_{9}} & \mathbf{x\_{10}} \\\\ \text{Scale 3:} & \mathbf{y\_{1}} & \mathbf{y\_{2}} & \mathbf{y\_{3}} & \mathbf{y\_{4}} & \mathbf{y\_{5}} & \mathbf{y\_{6}} & \mathbf{y\_{7}} & \mathbf{y\_{8}} & \mathbf{y\_{10}} & \mathbf{y\_{10}} \\\\ \text{Scale 4:} & \mathbf{z\_{1}} & \mathbf{z\_{2}} & \mathbf{z\_{3}} & \mathbf{z\_{4}} & \mathbf{z\_{5}} & \mathbf{z\_{6}} & \mathbf{z\_{7}} & \mathbf{z\_{8}} & \mathbf{z\_{9}} \end{array} \tag{2}$$

in those that did not, indicating faster brain maturation (Scher et al., 2009). Sample entropy has also been used as a marker of brain maturation in neonates (de la Cruz et al., 2007) and was found to increase prenatally until maturation at about 42 weeks, then decreased after newborns reached full term (Zhang et al., 2009). A study of the correlation dimension (another measure of signal complexity) of EEG signals in healthy subjects showed an increase with aging, interpreted as an increase in the number of independent synchronous

Intuitively, complexity is associated with structural richness, depth, patterns upon patterns, incorporating correlations over multiple spatio-temporal scales (Costa et al., 2005b). There is no consensus on a definition of complexity, but algorithms have been developed to attempt to give meaning to complexity. In the context of time series analysis, the concept of entropy is relevant. The use of entropy measures to describe the information content of time series began with the publication of Shannon's Mathematical Theory of Communication (Shannon and Weaver, 1949). In an intuitive sense, information is a measure of the difference in uncertainty before and after a measurement. In the context of time series, information is related to the predictability of the series. Entropy is a mathematical function of the probability that the next point in a sequence or time series will be a certain values, given the previous (Baddeley, 2000). Several different entropy measures can be defined algorithmically, including Shannon entropy, spectral entropy, approximate entropy, Lempel-Ziv complexity and sample entropy (Sabeti et al., 2009), each with certain advantages for particular time series characteristics (length, amount of noise, for example). The sample entropy has been used for a number of investigations of physiological signals. Changes in sample entropy appear to correlate with aging and pathological conditions in the context of cardiac health (Bruce et al., 2009; Costa et al., 2008; Norris et al., 2008) and for normal brain development (Zhang et al., 2009) and to distinguish certain mental disorders such as schizophrenia (Sabeti et al., 2009; Takahashi

The multiscale entropy (MSE) analysis is one method for computing the complexity of a time series that builds on the sample entropy and expands the concept. It has been used to analyze a number of physiological processes (Costa et al., 2005b; Hornero et al., 2009; Norris et al., 2008; Takahashi et al., 2010). The multiscale entropy algorithm incorporates two steps. The first is a coarse-graining procedure that uses successive averaging of a time series to create new coarse-grained time series. For a window size τ, τ = 1, 2, … j, the jth coarse-grain

where xi is the original time series of length N and τ is the scale factor satisfying 1< τ < N/τ.

*i*=( ) *j*−1 τ+1

*j*τ

∑

*xi*

(1) 

(2)

j, is computed by averaging non-overlapping windows:

*y j* τ <sup>=</sup> <sup>1</sup> τ

A schematic illustration of this process is shown in equation 2.

networks in the brain (Stam, 2005).

et al., 2010).

series, y<sup>τ</sup>

The coarse-graining method for extracting signal variability on different scales used by (Costa et al., 2005b) seems to be a heuristic procedure without any solid theoretical foundation. Other procedures can be substituted that may be justified on similar grounds. Perhaps the most immediate alternative would be to use the median rather than the mean value in each coarse graining step. This would have the effect of emphasizing the variability of the original signal rather than smoothing out such variability. Another procedure would be to select every kth point from the original series, where k is the desired scale, and use a pre-selected window size to compute an average value at the kth point. A systematic discussion and computational experiments have yet to be done for the coarse graining procedure that is central to the multiscale entropy algorithm.

The second step is to then compute the entropy of each of the coarse-grain time series y<sup>τ</sup> j, using some entropy measure. The sample entropy is the most common entropy formulation to be used for analyzing physiological signals (Costa et al., 2005b). A useful variation to the original multiscale entropy algorithm uses the modified sample entropy defined in (Xie et al., 2008). The practical effect of using the modified sample entropy is the computed entropy values are more robust to noise and results are more consistent with short time series. In brief, the similarity functions Am and Bm defined by equations (7) and (9) in (Xie et al., 2008) are computed for each coarse-grained time series defined in equation 1. The modified multiscale entropy (mMSE) is then defined as the series of modified sample entropy values at each of the coarse grain scales. This method was used for complexity analysis of EEG time series as a biomarker for autism risk (Bosl, et al. 2011).

An alternative to the MSE is the scale dependent Lyapunov exponent (SDLE) algorithm described in (Gao, 2007; Gao et al., 2006). This measure of complexity is stable for short, noisy time series and reportedly is able to distinguish a number of different types of chaotic motion, including noise-induced chaos, stochastic oscillations and others, which entropy measures are not able to do. SDLE has not yet been used to analyze EEG signals in young children or infants. The SDLE algorithm is based on following the time evolution of all pairs of vectors in phase space that satisfy a given embedding restriction. This results in a rather straightforward algorithm for computing the SDLE. The SDLE is reportedly better at distinguishing noise from chaotic dynamics in time series. SDLE was shown to be a more effective measure of heart disease than sample entropy and MSE (Hu et al., 2009a). Similarly, SDLE was shown to be more effective in retrospectively identifying changes in EEG signal complexity just prior to the onset of epileptic seizures than MSE, but few other studies of SDLE with EEG time series have been done. This is a potentially promising measure to be investigated further.

### **3.2 Detecting nonlinearity in time series**

Living systems exhibit a fundamental propensity to move forward in time. This property also describes physical systems that are far from an equilibrium state. For example, heat moves in only one direction, from hot to cold areas. In thermodynamics, this property is related to the requirement that all systems must move in the direction of higher entropy. Time irreversibility was found to be a characteristic of healthy human heart electrocardiogram (EKG) recordings and was shown to be a reliable way to distinguish between actual EKG recordings and model EKG simulations (Costa et al., 2008). EKG signals from patients with congestive heart disease were found to have lower time irreversibility indices than healthy patients (Costa et al., 2005a). Interestingly, time irreversibility of EEG signals has been associated with epileptic regions of the brain and this measure has been proposed as a biomarker for seizure foci (Gautama et al., 2003). Time irreversibility may be used as a practical test for nonlinearity in a time series.

As an illustration, a time irreversibility index (trev) was computed for different resolutions of the EEG time series using the algorithm of (Costa et al., 2008). The third column of Figure 1 shows trev for several different linear and nonlinear time series. Of particular note is that only the sine wave time series and both random time series have nearly zero irreversibility indices, while the index for the nonlinear logistic series and the representative EEG signal are both nonzero on all scales shown.

Fig. 1. Characteristics of five different time series are shown. Column 1 shows the time series amplitudes. Column two is the multiscale entropy, where the horizontal axis is the coarse graining scale, from 1 to 20. Column 3 is the multiscale time asymmetry value. The value of a in the lower right corner of the time asymmetry plot is the value of the time asymmetry index summed over scales 1 to 5. A non-zero time asymmetry value is a sufficient condition for nonlinearity of a time series.

After computing multiple resolutions of the EEG time series using the multiscale algorithm shown in equation 2, an estimate of the time irreversibility for each resolution is computed by noting that a symmetric function or time series will have the same number of increments as decrements. That is, the number times |xi+1 – xi | > 0 will be approximately the same as the number of times |xi+1 – xi | < 0. Thus, an estimate of the time series symmetry (or reversibility) was found by summing increments and decrements and dividing by the length of the series. A reversible time series will have a value of zero. For a series of 5000 points, as

proposed as a biomarker for seizure foci (Gautama et al., 2003). Time irreversibility may be

As an illustration, a time irreversibility index (trev) was computed for different resolutions of the EEG time series using the algorithm of (Costa et al., 2008). The third column of Figure 1 shows trev for several different linear and nonlinear time series. Of particular note is that only the sine wave time series and both random time series have nearly zero irreversibility indices, while the index for the nonlinear logistic series and the representative EEG signal

Fig. 1. Characteristics of five different time series are shown. Column 1 shows the time series amplitudes. Column two is the multiscale entropy, where the horizontal axis is the coarse graining scale, from 1 to 20. Column 3 is the multiscale time asymmetry value. The value of a in the lower right corner of the time asymmetry plot is the value of the time asymmetry index summed over scales 1 to 5. A non-zero time asymmetry value is a sufficient condition

After computing multiple resolutions of the EEG time series using the multiscale algorithm shown in equation 2, an estimate of the time irreversibility for each resolution is computed by noting that a symmetric function or time series will have the same number of increments as decrements. That is, the number times |xi+1 – xi | > 0 will be approximately the same as the number of times |xi+1 – xi | < 0. Thus, an estimate of the time series symmetry (or reversibility) was found by summing increments and decrements and dividing by the length of the series. A reversible time series will have a value of zero. For a series of 5000 points, as

used as a practical test for nonlinearity in a time series.

are both nonzero on all scales shown.

for nonlinearity of a time series.

used in figure 1, trev > 0.1 is a significant indicator of irreversibility and thus of nonlinearity (Schreiber and Schmitz, 1997). This information is used only to indicate that nonlinear information is contained in the EEG time series that is not used in linear analysis methods, suggesting that the MSE may contain more diagnostically useful information than power spectra analysis alone.

Additional methods for characterizing nonlinear signals may be derived from recurrence plot analysis, to be discussed separately below. Communications and electrical engineers may be especially well suited to research in analyzing brain activity and applying methods from communication signals analysis to find information that can be correlated to behavioral and cognitive assessment data. Integration of new results from both nonlinear time series analysis and complex network research may prove to be a fruitful approach for engineers interested in finding patterns in neural activity that are correlated to complex behavioral patterns that psychiatrists and psychologists use to characterize mental health.
