1 Introduction

Epileptic seizure is defined as a transient occurrence of signs and/or symptoms due to abnormal excessive or synchronous neuronal activity in the brain by the International League Against Epilepsy (ILAE) (Fisher, 2014). Electroencephalography (EEG) is one of the primary diagnostic tools to be used currently in the location and characterization of seizures. Currently, the clinical diagnosis of epilepsy is basically based on the doctor’s clinical experience by visually observing the patient’s EEG. And due to the predictability of the seizure, long-term detection of the subject is necessary, which leads to disadvantages such as long manual detection and low efficiency for doctors. Therefore, it is necessary to apply signal processing methods for automatic detection of epileptic EEG in the diagnosis of epilepsy.

Many studies have been reported on epileptic EEG. For example, the classifier to detect epileptic seizures was optimized by finding an optimal combination of training sets  (Bogaarts et al., 2016). The epileptic seizures were predicted with the autoregressive (AR) model  (Chisci et al., 2010). Moreover, a novel index was proposed to predict the epileptic seizure  (Aksenova et al., 2007). Another work introduced the measure based on data mining techniques to analyze the epileptic EEG  (Exarchos et al., 2006). Furthermore, another study proposed a methodology for nonlinear estimation based on bispectral analyses in localizing the epileptogenic focus side  (Villa and Tetko, 2010). However, more features need to be used to analyze the epileptic EEG to obtain more accurate results of detecting epileptic seizures. In this paper, phase-amplitude coupling (PAC) is introduced to detect epileptic seizures. The underlying idea behind using PAC is that PAC may be as a candidate biomarker to characterize the epileptic seizures as it has been proven to be closely associated with cognitive activity in the brain  (Canolty and Knight, 2010).

PAC is defined as the coupling on high-frequency amplitude modulated by low-frequency phase. Many studies have shown the differences in coupling between epilepsy zone and normal zone. For example, research has shown that the PAC was elevated in the seizure onset zone for the children with medically intractable epilepsy secondary to focal cortical dysplasia  (Ibrahim, 2013). And delta-modulated high-frequency oscillation may provide accurate localization of epileptogenic zone by identifying the regions of interest for extratemporal lobe patients  (Guirgis, 2015). Moreover, the PAC in seizure onset zone was higher than normal zone  (Mina Amiri et al., 2016).

There are several approaches to evaluate PAC strength. In this paper, five common PAC methods were employed to compute PAC values between low-frequency phase and high-frequency amplitude from different aspects, in order to identify EEG of seizure activity and EEG of seizure-free intervals and compare the performance of five PAC algorithms. Specifically, Bonn EEG data were filtered into three bands of low-frequency oscillation and three bands of high-frequency oscillation, and PAC values for nine groups of band combination were calculated by every PAC method, respectively. Then PAC features for the EEG of seizures activity and for the EEG of seizure-free intervals were classified by using support vector machine (SVM). Afterward, the classification results were evaluated by calculating mean area under curve (AUC) value based on receiver operating characteristic (ROC) with k-fold cross-validation (CV). Final results showed that there existed obvious coupling features between \(\theta \) band phase and \(\gamma \) band amplitude for EEG in seizures, with the classification result which was up to 0.99 for the EEG of seizures within epileptogenic zone and the EEG of seizure-free intervals not in epileptogenic zone, as well as the classification accuracy was up to 0.96 for the EEG of seizures and seizure-free intervals within epileptogenic zone. Results also show that the classification accuracy analyzed by five different algorithms of computing PAC was similar to each other. Moreover, the phase-amplitude comodulogram confirms intuitively the classification results.

2 Materials and Methods

2.1 Materials

The epileptic EEG dataset used in this paper is from the Department of Epileptology at the University of Bonn  (Andrzejak, 2001). The dataset is publicly available and used widely in the research of epileptic EEG data analysis and classification. There were five sets in the dataset, denoted as set A, set B, set C, set D, and set E. Each of set contained 100 single-channel EEG segments with recording duration of 23.6 s per segment. The sampling rate and band-pass filter were set to 173.61 and 0.5340 Hz. In details, set A and set B were surface EEG recordings taken from five healthy volunteers who were relaxed in an awake state with eyes open (set A) and eyes closed (set B). Set C, set D, and set E were intracranial EEG recordings originated from five patients, in which set C and set D were taken from during seizure-free intervals from the opposite of the hemisphere of the brain (set C) and within epileptogenic zone (set D), set E was taken from epileptic seizure activity. In this paper, set C, set D, and set E were studied.

2.2 Methods of PAC

PAC is explained as that the high-frequency amplitude is modulated by the low-frequency phase. Low-frequency phase time series and high-frequency amplitude time series were computed firstly before computing the PAC strength. In this paper, finite impulse response (FIR) filter and Hilbert transform were used. Take an example, for a single-channel time series \(x(n) \ (n=1,2,\ldots ,N)\), FIR filtered was applied to extract high-frequency oscillation interested \(x_{h}(n)\) and low-frequency oscillation interested \(x_{l}(n)\). Then, the Hilbert transform was used to extract corresponding instantaneous phase time series and instantaneous amplitude time series of both oscillations. Two analytic signals were obtained as

$$\begin{aligned} z_{l}(n) = a_{l}(n)e^{i\phi _{l}(n)}, \ a_{l}(n) = |z_{l}(n)|, \end{aligned}$$
(1)
$$\begin{aligned} z_{h}(n) = a_{h}(n)e^{i\phi _{h}(n)}, \ a_{h}(n) = |z_{h}(n)|, \ (n = 1,2,\ldots ,N), \end{aligned}$$
(2)

where \(\phi _{l}(n)\) and \(\phi _{h}(n)\) were the instantaneous phase time series, as well as \(a_{l}(n)\) and \(a_{h}(n)\) were the instantaneous amplitude time series of both high-frequency oscillation and low-frequency oscillation. It is shown in Fig. 1 the process of band-pass filtering and Hilbert transform before computing coupling strength.

Fig. 1
figure 1

EEG signal preprocessing process. a was one second raw EEG segment \(x(n) \ (n=1,2,\ldots ,N)\). b and c were the low-frequency filtered signal \(x_{l}(n)\) of 4–8 Hz and high-frequency filtered signal \(x_{h}(n)\) of 30–40 Hz processed by FIR filter. d and e were the corresponding low-frequency phase \(\phi _{l}(n)\) and high-frequency amplitude time series \(a_{h}(n)\) calculated by Hilbert transform. HT denotes Hilbert transform. The figure is original.

There were five algorithms to be employed to calculate the PAC strength. The first method was used to estimate PAC strength by taking the mean vector length modulation index (MVL-MI)  (Canolty and Edwards, 2006). It firstly defined the complex variable \(z(n) = a_{h}(n)e^{i\phi _{l}(n)} \ (n=1,2,\cdots ,N)\) and then computed the absolute value of the mean vector based on z(n) and defined the MI as

$$\begin{aligned} M_{\mathrm{raw}} = \left| \frac{1}{N}\sum _{i=1}^{N}z(n)\right| , \ (n = 1,2,\ldots ,N). \end{aligned}$$
(3)

Then use surrogate data approach to compute the surrogate \(z_{s}(n) \ (n = 1,2,\ldots ,N;\) \(\ s = 1,2,\ldots ,S)\) by introducing an arbitrary time lag between \(\phi _{l}(n)\) and \(a_{h}(n)\). And compute the mean vector \(M_{s} = \left| \frac{1}{N}\sum _{i=1}^{N}z_{s}(n)\right| \) of \(z_{s}(n)\) according to the definition of MI. And repeat the above step for \(s = 1,2,\ldots ,S\) times to obtain the surrogate values \(M_{1},M_{2},\ldots ,M_{S}\), and compute the mean \(\mu \) and standard variance \(\sigma \) of these surrogate values. Finally, compute the normalized MI to evaluate PAC strength which is denoted as M, where

$$\begin{aligned} M = \left| \frac{M_{\mathrm{raw}}-\mu }{\sigma }\right| . \end{aligned}$$
(4)

The second method to quantify the PAC is based on phase-locking value (PLV) (Vanhatalo, 2004; Cohen, 2007; Mormann, 2010). The PLV is defined as

$$\begin{aligned} PLV = \left| \frac{1}{N}\sum _{n=1}^{N}e^{i(\phi _{l}(n)-\phi _{a_{h}}(n))}\right| , \end{aligned}$$
(5)

where Hilbert transform is applied to \(a_{h}(n)\) to get \(\phi _{a_{h}}(n)\).

The third algorithm to measure the PAC strength was based on general linear model (GLM)  (Penny and Duzel, 2008). For the algorithm, a new high-frequency amplitude model by introducing a multiple regression is

$$\begin{aligned} a_{h} = X\beta + e, \end{aligned}$$
(6)

where \(X= \left[ \begin{array}{cccc} \cos (\phi _{l}(1)) &{} \sin (\phi _{l}(1)) &{} 1 \\ \vdots &{} \vdots &{} \vdots \\ \cos (\phi _{l}(n)) &{} \sin (\phi _{l}(n)) &{} 1 \\ \cos (\phi _{l}(N)) &{} \sin (\phi _{l}(N)) &{} 1 \end{array} \right] _{N\times 3}, \ (n = 1,2,\ldots ,N)\), \(\beta \) are regression coefficients by using least squares solution, and \(\cos (\phi _{l}(n))\) and \(\sin (\phi _{l}(n))\) are the cosine and sine transform of low-frequency phase time series, respectively. Afterward, the value \({r_{GLM}}^2\) which is defined to quantify the coupling strength is described as

$$\begin{aligned} {r_{\mathrm{GLM}}}^2 = \frac{SS(a_{h})-SS(e)}{SS(a_{h})}, \end{aligned}$$
(7)

where \(SS(A_{h})\) and SS(e) are the sum of squares of high-frequency amplitude time series \(a_{h}\) and the sum of squares of error e.

The fourth method to evaluate the PAC was based on an adaptive of the Kullback–Leibler distance (KL distance) (Tort, 2010). In this algorithm, \(\phi _{l}(t)\) is divided into bins in order, and the mean value of \(a_{h}(t)\) in each phase bin j is computed, where the mean value is expressed by \(\left\langle a_{h} \right\rangle _{\phi _{l}}(j)\). And normalize the mean value \(\left\langle a_{h} \right\rangle _{\phi _{l}}(j)\) as

$$\begin{aligned} P(j) = \frac{\left\langle a_{h} \right\rangle _{\phi _{l}}(j)}{\sum _{j=1}^{N_{\mathrm{bins}}}\left\langle a_{h} \right\rangle _{\phi _{l}}(j)}, \end{aligned}$$
(8)

where \(N_{\mathrm{bins}}\) is the number of phase bins. Then the new MI is defined as

$$\begin{aligned} MI = \frac{D_{KL}(P, U)}{\log (N_{{\mathrm{bins}}})}, \end{aligned}$$
(9)

where \(D_{KL}(P, U) = \log (N_{{\mathrm{bins}}}) - H(P), H(P) = -\sum _{j=1}^{N_{{\mathrm{bins}}}}P(j)\log [P(j)]\).

The fifth method to quantify the PAC strength is by redefining the MVL-MI as (Tolga, 2011)

$$\begin{aligned} \rho = \frac{1}{\sqrt{N}}\times \frac{|\sum _{n=1}^{N}a_{h}(n)e^{i\phi _{l}(n)}|}{\sqrt{\sum _{n=1}^{N}a_h(n)^2}} (n = 1,2,\ldots ,N). \end{aligned}$$
(10)

2.3 Method of Classification

SVM is a supervised learning method based on statistical learning theory (SLT) in machine learning. The basic model is the linear classifier that defines the largest interval in the feature space. It maps the vector to the high-dimensional feature space through nonlinear mapping and then selects the most classified surface to obtain a hyperplane segmentation, which can separate the two types of modes and ensure the interval is maximized as shown in Fig. 2.

Fig. 2
figure 2

Principle of binary classification based on SVM. The figure is original.

The hyperplane segmentation \(\vec{H}\) is defined as

$$\begin{aligned} \vec{w}^{T}x + b = 0. \end{aligned}$$
(11)

Then the problem of finding the max margin can be transformed to the following conditional extreme value problem, defined as

$$\begin{aligned} \left\{ \begin{array}{lr} \qquad \min \frac{1}{2}\vec{w}^{T}\vec{w}, &{} \\ s.t. \quad y_{i}(\vec{w}^{T}x_{i} + b) - 1 \ge 0. &{} \end{array} \right. \end{aligned}$$
(12)

2.4 Evaluation of Classifier Performance

In this paper, the classification performance of SVM is evaluated by the mean AUC based on ROC with k-fold CV. AUC is defined as the area under the ROC curve, and ROC is the indicator to reflect the relationship between sensitivity and specificity of variables. Especially, the k-fold CV is employed to reduce bias and get more information from limited samples, in which k-fold CV is a resampling procedure that is used to assess machine learning models on limited data samples. The calculation of mean AUC is shown in Fig. 3. Firstly, the dataset is shuffled randomly and partitions the original dataset into k equal subsets. Onefold data are retained as the validation set, and all the remaining \(k-1\) folds are kept in the CV training set. Secondly, the CV training set is used to train the machine learning model, and the AUC value of the model is calculated by validating the predicted results against the validation set. Thirdly, repeat the step for k times and k AUC values are calculated. Finally, estimate the accuracy of the model by taking the mean of the AUC derived in all the k cases of CV.

Fig. 3
figure 3

Process of classification performance evaluation based on SVM and k-fold CV. The figure is original.

3 Results

In this paper, set C, set D, and set E of Bonn dataset at nine frequency band combinations were processed by five methods of PAC illustrated above, in which nine band combinations were \(\delta _{l}-\alpha \), \(\delta _{l}-\beta \), \(\delta _{l}-\gamma \), \(\delta _{h}-\alpha \), \(\delta _{h}-\beta \), \(\delta _{h}-\gamma \), \(\theta -\alpha \), \(\theta -\beta \), and \(\theta -\gamma \). Then PAC features were classified using SVM by means of scikit-learn Python module “sklearn.svm.SVC” function with kernel set to linear  (Pedregosa and Varoquaux, 2011). And the classification performance was described by computing mean AUC value based on ROC with k-fold CV, in which \(k=10\). The flowchart of process is shown in Fig. 4.

Fig. 4
figure 4

Flowchart of Bonn data analysis experiment based on five PAC methods. The figure is original.

From Tables 1 and  2, it is intuitively observed that the AUC at band combination \(\theta -\gamma \) is obviously the highest, that is to say, there exits significant coupling of seizure activity between the phase of \(\theta \) band and the amplitude of \(\gamma \) band. Specifically, the classify accuracy of detecting seizures is up to 0.96 at band combination \(\theta -\gamma \) within an epileptogenic zone by using GLM algorithm. Moreover, the accuracy to detect seizures reaches 0.99 at band combination \(\theta -\gamma \) for set C and set E. Furthermore, the classification results processed by five different methods of computing PAC were similar to each other.

Table 1 AUC of PAC for set D and set E based on five PAC methods at nine band combinations
Table 2 AUC of PAC of set C and set E based on five PAC methods at nine band combinations

Moreover, phase-amplitude comodulogram based on MVL\(^{1}\) method was used to observe intuitively the differences of PAC features of seizure activity and seizure-free intervals. Phase-amplitude comodulogram is the graphical representation that exhibits coupling strength among multiple bands. When there is no prior assumption of frequency bands phase-modulating and the amplitude-modulated, the comodulogram can be used to locate initially the frequency bands where coupling occurs. We applied comodulogram measure to analyze set C, set D, and set E. For each single channel of each group, the comodulogram was obtained by representing MI values of multiple \(\left[ \begin{array}{cc} f_{A}(i),&f_{P}(j) \end{array} \right] \) pairs, with both \(f_{A}(i)\) and \(f_{P}(j)\) being calculated in 0.5 Hz steps with 0.5 Hz bandwidths in frequency range 0.5–40 Hz. Then, 100 comodulograms for each set were obtained. Hereafter, mean values were taken for each set. As shown in Fig. 5, compared with mean comodulograms of set C and set E as well as results of set D and set E, it is significantly shown that there exists strong coupling at band combination \(\theta -\gamma \) for set E, which is consistent with the classification results illustrated above (Tables 1 and  2).

Fig. 5
figure 5

Results of mean comodulograms of set C, set D, and set E for Bonn dataset based on MVL\(^{1}\) method. x-axis and y-axis represent frequency of phase and frequency of amplitude, respectively. PAC values are displayed by pseudo-color plot. The part marked by purple denotes there is strong phase-amplitude coupling between the phase of \(\theta \) and the amplitude of \(\gamma \). The figure is original.

4 Conclusions

In this paper, epileptic EEG of Bonn dataset was analyzed by five PAC algorithms at nine different frequency band combinations to evaluate the differences of PAC strength between seizure activities and seizure-free intervals. The coupling strength features at different band combinations computed by different PAC methods were extracted and classified by SVM. Classification results were then denoted by AUC based on ROC with k-fold CV. Final results were shown that the classification accuracy was the highest at band combination \(\theta -\gamma \), which can be explained as that there existed stronger PAC strength in EEG during seizure activity at the band combination \(\theta -\gamma \) compared with EEG during seizure-free intervals. Hereafter, the results processed by five different evaluation methods of computing PAC were similar to each other, which illustrated the coupling results are almost unaffected by the difference of evaluation methods. Moreover, the results were also visually verified via phase-amplitude comodulogram. All these summaries indicate that the PAC feature can be used as a biomarker to detect epileptic seizures. Furthermore, this paper has a potential limitation that only EEG from ten subjects was analyzed, so in the future study, more datasets will be collected to certify the generality of the conclusion that the PAC can be used as one of the biomarkers to detect epileptic seizures.