**3. Quantified EEG**

There are two branches of analysis: power spectra and synchronization. For both of them, dynamic (i.e., varying along the time) and mean measurements (i.e., mean spectra or mean graph of synchronization) are obtained. The process is summarized in **Figure 1**.

The process used for qEEG followed these steps:

Different length raw records are exported from the EEG device (EEG32,

NeuroWorks, XLTEK®, Oakville, ON, Canada) to an ASCII file. Usually, artifacts are excluded by the export of several artifact-free chunks, which are later combined for analysis. We have shown that this process does not changes the main properties analyzed (see below). This process (exportation to an ASCII file) would probably be different for other EEG suppliers, but we have not assessed this possibility. We have computed the export time (*texport*) as a function of the ASCII file size (S) and obtained a linear expression by means of least-square fitting (r = 0.9947):

$$t\_{\text{export}}(\text{s}) = \mathbf{0}.4\mathbf{3S}(\text{MB}) + \mathbf{4.13} \tag{1}$$

Although the raw recordings were digitized at 512 or 1024 Hz, we down-sampled to 128 or 256 Hz.

Exported files are digitally are filtered by a sixth-order Butterworth digital filter between 0.5 and 30 Hz.

#### **Figure 1.**

*Method of electroencephalogram (EEG) quantification in two branches: Power spectra (b–d) and synchronization (e,f). (a) Raw EEG tracing. The discontinuous rectangle shows the moving window used for analysis; (b) power spectra for each channel; (c) areas for delta, theta, alpha, and beta bands under the spectrum are highlighted in different colors; (d) dynamics of the four bands (and entropy in the lower row) for every lobe. Mean and SEM values for each tracing are displayed inside each graph. Red and blue lines indicate right and left hemispheres, respectively; (e) correlation matrix for the window; (f) mean correlation computed for all recordings [34].*

A differential EEG montage is then reconstructed. Topographic placement of channels is defined on the scalp as the midpoint between the electrode pairs defining the channel; e.g., the Fp1–F3 channel would be placed at the midpoint of the geodesic between the Fp1 and F3 electrodes.

All recording can be divided into different lengths of moving windows (1–5 s each) with different overlaps (between 0 to 50%, but usually 10%). The total length used during the fast Fourier transform (FFT) is directly related to frequency precision in the power spectrum (PS). Overlap is used to minimize the border effect produced by windowing [35].

For each window (n) and frequency (k), we computed the fast Fourier transform (FFT) of the voltage (*V<sup>m</sup>*ð Þ *<sup>n</sup>* ) obtained from each channel (m) to obtain the power spectrum (*S<sup>m</sup> <sup>n</sup>*,*<sup>k</sup>*, in <sup>μ</sup>V2 /Hz). We used the expression:

$$S\_{n,k}^{m} = \sum\_{n=0}^{N-1} V^{m}(n) e^{-i\frac{2\pi kn}{N}}; m = F p\_1, F\_3, \dots \tag{2}$$

We also computed Shannon's spectral entropy (SSE) according to:

$$\text{SSE}\_{k}^{m} = -\sum\_{k=0}^{F} p\_{k} \log\_{2} p\_{k} \tag{3}$$

*Necessity of Quantitative EEG for Daily Clinical Practice DOI: http://dx.doi.org/10.5772/intechopen.94549*

where *F* is the maximum frequency computed and *pk* is the probability density of *S*, obtained from the expression:

$$p\_k = \frac{\mathbf{S}\_{n,k}^m}{\sum\_{k=0}^F \mathbf{S}\_{n,k}^m \Delta k} \tag{4}$$

We computed the area under the *Sm <sup>n</sup>*,*<sup>k</sup>* according to the classical segmentation of EEG bands. We used the expression:

$$\mathcal{A}\_{j}(k) = \sum\_{k=\inf}^{\sup} \mathcal{S}\_{n}^{m}(k) \Delta k; j = \delta, \theta, a, \beta \tag{5}$$

The expression *sup* refers to the upper limit of each EEG band.

The absolute value of Pearson's correlation coefficient (*ρ*) is computed for each pair of channels (*i,j*) according to the expression:

$$\rho\_{ij}^k = \frac{\sum\_{k=1}^{N\_{\text{window}}} \left( \boldsymbol{\kappa}\_i(k) - \overline{\boldsymbol{\kappa}}\_i \right) \sum\_{k=1}^{N\_{\text{window}}} \left( \boldsymbol{\kappa}\_j(k) - \overline{\boldsymbol{\kappa}}\_j \right)}{\sqrt{\sum\_{k=1}^{N\_{\text{window}}} \left( \boldsymbol{\kappa}\_i(k) - \overline{\boldsymbol{\kappa}}\_i \right)^2 \sum\_{k=1}^{N\_{\text{window}}} \left( \boldsymbol{\kappa}\_j(k) - \overline{\boldsymbol{\kappa}}\_j \right)^2}} \tag{6}$$

where *Nwindow* is the number of points included in a window (usually 128) and *xi*, *x <sup>j</sup>* represents the mean of both channels.

The mean value of all windows is then computed, obtaining the mean correlation matrix.

Areas of the same band are grouped by cerebral lobes. In the case of the left hemisphere (shown as an example), we grouped the frontal *F* ¼

$$\begin{cases} \frac{\left(\frac{\left(F\_{\mathcal{P}\_{1}}-F\_{\mathcal{S}}\right)+\left(F\_{\mathcal{T}}-G\_{\mathcal{S}}\right)+\left(F\_{\mathcal{T}}-F\_{\mathcal{T}}\right)}{3}\right)}{3}, \text{partial} \text{-periodic-occcipital } PO = \left\{\frac{\left(C\_{3}-P\_{3}\right)+\left(P\_{3}-O\_{1}\right)+\left(T\_{5}-O\_{1}\right)}{3}\right\}, \text{ and} \\ \text{temporal } T = \left\{\frac{\left(F\_{\mathcal{P}\_{1}}-F\_{\mathcal{T}}\right)+\left(F\_{\mathcal{T}}-T\_{5}\right)+\left(T\_{3}-T\_{5}\right)+\left(T\_{5}-O\_{1}\right)}{4}\right\}. \text{channels from the right hemisphere} \end{cases}$$

sphere were grouped accordingly. These areas, for both bands (*j*) and lobes (*r*), *Ar j* ð Þ*t* ;*r* ¼ *F*, *PO*, *T*, are plotted as time functions and compared between the hemispheres. The same groups were used to compute *SSe*.

The total time of analysis (*tanalysis*) is obtained from this linear expression, which was obtained from least-square fitting:

$$t\_{analys}(\mathbf{s}) = \mathbf{0}.\mathbf{32S}(\mathbf{MB}) + \mathbf{46.3} \tag{7}$$

From expressions 1 and 7, for a typical 88 MB file (10 min record), we can estimate the time spent in export + analysis as less than 2 min.

We can optionally introduce two time-markers to define different states (e.g., pre-ictal, ictal, and post-ictal periods) in order to statistically compare the changes.

We can optionally export the numerical results to an Excel® file (e.g., mean � SEM of power, synchronization; and SSe for channels, lobes, and hemispheres). This last step is the most time-consuming (up to 3 min for a custom-length file).

Numerical analysis of EEG recordings was performed with custom-made MATLAB® software (MathWorks, Natick, MA, USA).

For power spectra as well as for synchronization, we can represent measurements either as dynamic time-dependent variables (**Figure 1d**), or as the mean values, averaged over the file (**Figure 1b,f**). Therefore, although complementary, information obtained from both kinds of computations must be interpreted differently. In other words, average measurements are only useful if the stationarity of the record is evident (e.g., basal recordings, well-defined phases of sleep, etc.).

### **4. Robustness of the method**

A very important aspect of any numerical method is its robustness, e.g., the evaluation of the method wherein the results obtained are found to be reliable, even when performed under slightly varied conditions. It is the ability of a method to remain unaffected when slight variations are applied. It is extremely important to check trials of the numerical method within the same group of EEG records under the different conditions of i) down sampling, ii) windowing, or iii) overlapping. Moreover, it is important to check whether synchronization measures are affected by the global analysis of different, non-consecutive chunks.

For this purpose, we selected EEG recordings of five minutes in length, from six control individuals (without any neurological or psychiatric pathology, between 20 and 30 years old, and with no pharmacological treatment). We analyzed each EEG under different conditions, namely:


Overall, we had 18 combinations for frequency/windows/overlapping (*f,w,o*). The structure of EEG for each patient (*pi*, *i* = 1,2, … 6) can be described by a 10-element vector as:

$$p\_i = (\delta\_i^l, \theta\_i^l, \alpha\_i^l, \beta\_i^l, \rho\_i^l, \delta\_i^r, \theta\_i^r, \alpha\_i^r, \beta\_i^r, \rho\_i^r); l = \text{left}, r = \text{right} \tag{8}$$

Obviously, every structure can be described as *pi* ð Þ *f*, *w*, *o* . A robust method should not affect the structure of EEG for the same patient, irrespective of changes in absolute values. For each patient, we have plotted along the x-axis (coordinates of EEG structure) the normalized band values and correlations for all of the 18 combinations (**Figure 2**).

From **Figure 2**, we can observe that different combinations cannot affect the structure of EEG.

The effect of multiple compositions of the analyzed file on synchronicity was assessed as follows: an EEG record of 3 min was analyzed. Then, the same record was exported in three different chunks, and a new analysis was performed on a recombined file with the parts randomly ordered (1,3,2/2,1,3/2,3,1/3,1,2 or 3,2,1). We did not observed any difference in synchronization between the whole record and a recombined one (not shown).

In summary, these results demonstrate that the method is highly robust, at least for the limits addressed.

*Necessity of Quantitative EEG for Daily Clinical Practice DOI: http://dx.doi.org/10.5772/intechopen.94549*

**Figure 2.** *Structures of EEG for the 18 combinations of variables for (a) patient #1, (b) patient #2, (c) patient #3, (d) patient #4, (e) patient #5 and (f) patient #6. L = left, R = right, d = delta, t = theta, a = alpha, b = beta, and rho = correlation.*
