1 Introduction

Epilepsy is classified as a neurological disorder and is characterized by the presence of recurring seizures that cause momentarily lapses of consciousness. Nearly 50 million people worldwide have epilepsy [38]. Approximately 90% of these people live in developing countries, and approximately three-fourths of them do not have access to the necessary treatment. Sudden and abrupt seizures can have significant impacts on the daily lives of sufferers. Thus, detecting and predicting epileptic seizures would help these people live normal lives.

Electroencephalography (EEG) is an electrophysiological monitoring method for recording electrical activity of the brain. Although it is one of the most common techniques for assessing epilepsy, it is also used to diagnose diseases such as schizophrenia, Alzheimer’s disease and sleep disorders [1, 37, 39]. Visual inspection of EEG data has not yet led to the detection of all characteristic changes that precede seizure onsets since it is difficult to separate seizures from artifacts that have similar time-frequency patterns [5, 6, 20]. Therefore, automatic detection of such activity is of great importance.

In recent years, several methods have been proposed for seizure detection that are based on fast Fourier transform (FFT) [2, 25, 34], wavelet transform (WT) [18, 23, 26], eigenvector methods (EMs) [40,41,42], time frequency distributions (TFDs) [28, 35] and the auto-regressive method (ARM) [16, 44]. FFT is faster than all other available methods in real-time applications. However, it appears to be the least efficient approach because of its inability to examine nonstationary signals. Moreover, it cannot be employed for the analysis of short EEG signals and suffers from large noise sensitivity [3]. WT was introduced as a solution for analyzing irregular data patterns. However, which wavelet family is the most suitable for analysis of non-stationary EEG signals is still being debated among researchers [19]. The most important application for EM is to evaluate frequencies and powers of signals from noise corrupted signals. The advantage of EM is that it produces high-resolution frequency spectra even when the signal-to-noise ratio is low. However, this method may produce spurious zeros, thereby leading to poor statistical accuracy [3]. The TFD method offers the possibility of analyzing relatively long continuous segments of EEG data even when the dynamics of the signal is rapidly changing. However, high resolution in both time and frequency is necessary, which wakes this method not preferable for use in many cases [3]. Finally, spectral analysis based on ARM is particularly advantageous when short data segments are analyzed. Since ARM suffers from low speed, it is not always applicable in real-time analysis [3]. Considering the shortcomings that are described above, there is considerable research being performed on the development of novel methods for the analysis of EEG time series.

The study of complex networks has become the focus of widespread attention in interdisciplinary research over the past decades. One of the reasons behind the growing popularity of complex networks is that almost any discrete structure can be suitably represented as special cases of graphs, whose features may be characterized, analyzed and, eventually, related to its respective dynamics [14]. Examples include the Internet, the World Wide Web, social networks of connections between individuals, neural networks, metabolic networks, food webs, distribution networks such as blood vessels, and networks of citations between papers [4, 30, 31]. Therefore, several investigations into complex networks involve the representation of the structure of interest as a network, followed by the analysis of the topological features of the obtained representation in terms of a set of informative measures, such as the clustering coefficient, the shortest path length, the mean jump length, the modularity, and the betweenness centrality.

Recently, we have proposed an approach for mapping a time series into a complex network representation that is based on the concept of transition probabilities and results in a so-called “quantile graph” (QG) [13]. Previous works have shown that time series with different dynamics are mapped into complex networks with different structures. For example, we have found associations between periodic time series and regular networks, random time series and random networks, and pseudo-periodic time series and small-world networks [13]. Moreover, we have shown that the bifurcation cascades of two well-known unimodal maps—the Logistic and Quadratic Maps—are mapped through the QG method into networks whose topological characteristics mimic the main features of their period-doubling route to chaos as a forcing parameter varies continuously [11]. We also showed that the QG method is able to detect differences in the data structures of physiological signals of healthy and unhealthy subjects [9, 12, 13]. Finally, we recently showed that the QG method enables the quantification of features such as long-range correlations or anti-correlations and can be used to estimate the Hurst exponent of fractional motions and noises [10].

Here, we use the QG method in the problem of differentiating normal, pre-ictal, and ictal conditions from recorded EEG signals. This method does not require assumptions about stationarity, length of the signal, or noise level [10, 13]. It is a numerically simple method and has only one free parameter, namely, Q, which represents the number of quantiles/nodes and is typically much smaller than T. The number of quantiles Q defines the partitioning level of the amplitude range of the original time series and its selection involves a trade-off between information loss and computational burden [10]. The QG method provides a unique approach to compressing T points of EEG time series into a list of at most \(Q^2\) values of the Markov transition matrix \(\mathbf {W_k}\). Additional storage savings occur when \(\mathbf {W_k}\) is sufficiently sparse that it is more efficient to store a weighted edge list [13]. The remainder of this paper is organized as follows: after this introduction, Sect. 2 describes the QG method for mapping a time series into a network. Network measures for the characterization, analysis and discrimination of complex networks are presented in Sect. 3. Section 4 describes the data set that is used in this study. The results are presented and discussed in Sect. 5, and the conclusions are presented in Sect. 6.

2 Methods

Let \(\mathcal {M}\) be a map from a time series \(X\in \mathcal {T}\) to a network \(g\in \mathcal {G}\), with \(X=\{x(t)|t\in \mathbb {N}, x(t)\in \mathbb {R}\}\) and \(g=\{\mathcal {N,A}\}\) being a set of nodes (or vertices) \(\mathcal {N}\) and arcs (or edges) \(\mathcal {A}\). \(\mathcal {M}\) assumes a simple discretization of X that is not sensitive to the distribution of its values. The Q quantiles of a time series, which are defined by the cutting points that divide X into \(Q-1\) equally sized intervals, are identified by ranking X and splitting this ranking through the \(Q-1\) intervals [43]. Each quantile is given by

$$\begin{aligned} q_i=x((T*i)/Q) \end{aligned}$$
(1)

for \(i=1,2,\ldots ,Q\). Once the Q quantiles have been identified, each value in X is mapped to its corresponding \(q_i\) for \(i=1,2,\ldots ,Q\). After that, \(\mathcal {M}\) assigns each quantile \(q_{i}\) to a node \(n_{i}\in \mathcal {N}\) in the corresponding network. Two nodes \(n_{i}\) and \(n_{j}\) are connected in the network with a weighted arc \((n_{i},n_{j},w_{ij}^k)\in \mathcal {A}\) whenever two values x(t) and \(x(t+k)\) belong to quantiles \(q_{i}\) and \(q_{j}\), respectively, with \(t=1,2,\dots ,T\) and the time differences \(k=1,\dots ,k_{max}<T\). Each weight \(w_{ij}^k\) in the weighted directed adjacency matrix, which is denoted as \(\mathbf {A_{k}}\), is equal to the number of times a value in quantile \(q_{i}\) at time t is followed by a point in quantile \(q_{j}\) at time \(t+k\). Therefore, repeated transitions through the same arc increase the value of the corresponding weight. With proper normalization, the weighted directed adjacency matrix \(\mathbf {A_{k}}\) becomes a Markov transition matrix \(\mathbf {W_{k}}\), with \(\sum _{j}^{Q} w_{ij}^k =1\) [10].

Previous works have shown that the QG method is weakly dependent on the choice of Q, which is the only free parameter of the QG method [10, 13]. That is, given a time series with T points our map is able to produce networks with similar topologies, regardless of the value of Q. The selection of Q involves a trade-off between information loss and computational burden. For the simplest, binary case, \(Q=2\) and the time series is mapped into a two-node network, which captures only the coarsest patterns of the original signal. Higher values of Q are able to discriminate more details but require longer time series for the transition probabilities to properly converge. In the limit, when Q equals the number of distinct values in the time series, there is no information loss if the number of data points is large enough for the statistics to converge. In this work, the number of quantiles has been defined as \(Q\approx 2T^{1/3}\) [27].

Figure 1 shows an illustration of the QG method for \(k=1\). A uniform white noise X with \(T=20\) time points is split into \(Q=4\) quantiles (colored shading). Using Eq. (1), the quantile intervals are given by [x(1), x(6)[, [x(6), x(11)[, [x(11), x(16)[ and [x(16), x(20)] for the ordered data. The quantiles are mapped into a network with \(\mathcal {N}=4\) nodes and each quantile is assigned to a node \(n_{i}\in \mathcal {N}\) in the corresponding network g. Then, the nodes \(n_{i}\) and \(n_{j}\) are connected in the network with a weighted arc \((n_{i},n_{j},w_{ij}^1)\in \mathcal {A}\). The arc weights are given by \((1,3,1), (1,4,3), (2,1,3), (2,2,1), (2,3,1), (3,2,2), \!(3,3,1), \!(3,4,2), \!(4,1,1), (4,2,2)\) and (4, 3, 2). Repeated transitions between quantiles result in arcs in the network with larger weights (represented in the corresponding network by thicker lines) and therefore higher values in the corresponding transition matrix.

Fig. 1
figure 1

Illustration of the QG method for a uniform white noise X with \(T=20\) time points, \(Q=4\) quantiles and \(k=1\). Using Eq. (1), the quantile intervals are given by [x(1), x(6)[, [x(6), x(11)[, [x(11), x(16)[ and [x(16), x(20)] for the ordered data. Since each value in X is mapped to its corresponding \(q_i\) for \(i=1,2,3,4\), the arc weights are given by ( , , 1), \(, , , , , , , , \) and

3 Network Measures

The characterization, analysis and discrimination of complex networks rely on the use of measures that are capable of expressing their most relevant topological features. Based on the values of \(\mathbf {A_{k}}\), we describe the network measures that are used in Sect. 5: the clustering coefficient (C), the shortest path length (L), the mean jump length (\(\varDelta \)), the modularity (\(M_o\)), and the betweenness centrality (B).

3.1 Clustering Coefficient

The tendency of a network to form tightly connected neighborhoods can be measured by the clustering coefficient. For a weighted directed adjacency matrix and a node \(n_i, C_i\) is defined as the ratio between all weighted directed triangles that are formed by node \(n_i\) (\(t_{i}\)) and the total number of possible triangles that \(n_i\) could form (\(T_{i}\)) [15]. Therefore,

$$\begin{aligned} C_i=\frac{t_i}{T_i}=\frac{\left[ \mathbf {A_k}^{[1/3]}+\left( \mathbf {A_k}^{T}\right) ^{[1/3]}\right] ^3_{ii}}{2\left[ d_i^{tot}\left( d_i^{tot}-1\right) -2d_i^{\leftrightarrow }\right] }, \end{aligned}$$
(2)

where \(\mathbf {A_k}^{[1/3]}=\{(a^{k})_{ij}^{1/3}\}\) is the matrix that is obtained from \(\mathbf {A_k}\) by taking the 3rd root of each entry, \(d_i^{tot}\) is the total degree of node \(n_i\), and \(d_i^\leftrightarrow \) is the number of bilateral edges between node \(n_i\) and its neighbors. Therefore, the global clustering coefficient C, which represents the overall level of clustering in the network, is the average of the local clustering coefficients of all the nodes.

3.2 Shortest Path Length

The average shortest path length, which is a measure of the efficiency of information flow on a network, is defined as the average number of steps along the shortest paths for all possible pairs of network nodes [31]. The average shortest path length is defined as follows. Let \(\hbox {dist}(n_1,n_2)\) denote the shortest distance between \(n_1\) and \(n_2 (n_1,n_2\in \mathcal {N})\). Assume that \(\hbox {dist}(n_1,n_2)=0\) if \(n_1=n_2\) or \(n_2\) cannot be reached from \(n_1, \hbox {has}\_\hbox {path}(n_1,n_2)=0\) if \(n_1=n_2\) or if there is no path from \(n_1\) to \(n_2\), and \(\hbox {has}\_\hbox {path}(n_1,n_2)=((a^{k})_{12})\) if there is a path from \(n_1\) and \(n_2\). Then, L is given by

$$\begin{aligned} L=\frac{\sum _{i,j}^N\hbox {dist}(n_i,n_j)}{\sum _{i,j}^N\hbox {has}\_\hbox {path}(n_i,n_j)}, \end{aligned}$$
(3)

where N denotes the number of nodes in \(\mathcal {G}, \sum _{i,j}^N\hbox {dist}(n_i,n_j)\) is the all-pairs shortest path length of \(\mathcal {G}\), and \(\sum _{i,j}^N\hbox {has}\_\hbox {path}(n_i,n_j)\) is the number of paths in \(\mathcal {G}\). Therefore, the value of L is given by the average of the shortest path lengths between all pairs of nodes in the network.

3.3 Mean Jump Length

With \(\mathbf {W}_k\) it is possible to perform a random walk on the quantile graph g and compute the mean jump length \(\varDelta (k)\), which is defined as follows:

$$\begin{aligned} \varDelta (k)=\frac{1}{S}\sum _{s=1}^{} \delta _{s,k}(i,j), \end{aligned}$$
(4)

where \(s=S\) are the jumps of length \(\delta _{s,k}(i,j)=|i-j|\), with \({i,j}=1,\dots ,Q\) being the node indices, as defined by \(\mathbf {W}_k\). Previous work has provided an approach that is less time-consuming for the calculation of the mean jump length \(\varDelta (k)\) [9], which is given by:

$$\begin{aligned} \varDelta (k)=\frac{1}{Q}tr\left( \mathbf {P}\mathbf {W}_k^T\right) , \end{aligned}$$
(5)

where \(\mathbf {W}_k^T\) is the transpose of \(\mathbf {W}_k\). \(\mathbf {P}\) is a \(Q \times Q\) matrix with elements \(p_{i,j}=|i-j|\), and tr is the trace operation.

3.4 Modularity

One issue that has received a considerable amount of attention is the detection and characterization of community structure in networks, which refers to the appearance of densely connected groups of nodes with sparser connections between groups [32]. Given a network, its partition P is a grouping of nodes into modules, with each node belonging to a single module. Let \(\mathcal {P}\) be the ensemble of all partitions of a network into modules and assign to each partition \(P\in \mathcal {P}\) the modularity:

$$\begin{aligned} M(P)=\sum _{i=1}^m\left[ \frac{e_i}{E}-\left( \frac{d_i}{2E}\right) ^2\right] , \end{aligned}$$
(6)

where E is the total number of edges in the network, \(e_i\) is the number of edges within module \(i, d_i\) is the sum of the degrees of all the nodes inside module i, and the sum in Eq. (6) is calculated over all m modules in partition P [21]. The objective of a module identification algorithm is to find a partition with the largest modularity. In this work, simulated annealing was used to determine the modules of a network by direct maximization of M [36].

3.5 Betweenness Centrality

It is possible to quantify the importance of a node in terms of its betweenness centrality [17], which is defined as:

$$\begin{aligned} B_{n_u}=\sum _{ij}\frac{\sigma (n_i,n_u,nj)}{\sigma (n_i,n_j)}, \end{aligned}$$
(7)

where \(\sigma (n_i,n_u,n_j)\) is the number of shortest paths between nodes \(n_i\) and \(n_j\) that pass through node \(n_u, \sigma (n_i,n_j)\) is the total number of shortest paths between \(n_i\) and \(n_j\), and the sum is calculated over all pairs \(n_i, n_j\) of distinct nodes [14]. The value of B is given by the average of the local betweenness centralities of all the nodes.

4 Data

In this study, we use an artifact-free EEG database that has been provided by the University of Bonn and made available online by Andrzejak [8]. This database has been widely used for EEG feature extraction and classification in the literature [5, 7, 29]. The database contains five hundred 23.6-s-long short signals and includes five sets (denoted as A, B, C, D and E) that each contain 100 single-channel EEG segments. The data were digitized at 173.61 samples/s using 12-bit resolution. Sets A and B consist of surface EEG recordings of healthy, awake volunteers with eyes open and closed, respectively. Sets C and D correspond to intracranial EEG signals from epileptic patients who were recorded during seizure-free intervals in the epileptogenic zone (D) and from the hippocampal formation of the opposite hemisphere of the brain (C). Set E contains seizure activity that was selected from sites that were exhibiting ictal activity. Exemplary EEG’s are depicted in Fig. 2.

EEG time series recordings of healthy subjects during the relaxed state and with eyes closed (Fig. 2B) show a predominant physiological rhythm, namely, the “alpha rhythm”, in a frequency range of 8–13 Hz. In contrast, broader frequency characteristics are obtained for subjects with eyes open (Fig. 2A). The EEG that was recorded from within the epileptogenic zone (Fig. 2D) during a seizure-free interval is often characterized by intermittent occurrences of interictal epileptiform activities. Investigation of these steep, sometimes-rhythmic high-amplitude patterns in EEG recordings contributes to the localization of the epileptogenic zone. Fewer and less-pronounced interictal epileptiform activities can be found at recording sites that are distant from the epileptogenic zone (Fig. 2C). Finally, the EEG that was recorded during epileptic seizures (Fig. 2E), which are termed ictal activity, is characterized by high amplitudes and quasiperiodicity, which result from the synchronous activity of large assemblies of neurons [22].

Fig. 2
figure 2

Exemplary EEG signals from each of the five sets. From top to bottom: set A (healthy volunteer with eyes open), B (healthy volunteer with eyes closed), C (epileptic volunteer, opposite zone), D (epileptic volunteer, epileptogenic zone) and E (epileptic volunteer, seizure activity)

Fig. 3
figure 3

C(k) versus k, which was computed using Eq. (2), \(Q=30, T=4,096\) and \(k=1,2,\ldots ,100\) for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure). In all cases, the curves for healthy (A and B) and epileptic (C and D) patients form two distinct clusters with maximum separation at approximately \(k=3\)

Fig. 4
figure 4

L(k) versus k, which was computed using Eq. (3), \(Q=30, T=4,096\) and \(k=1,2,\ldots ,100\) for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure). In all cases, the curves for healthy (A and B) and epileptic (C and D) patients form two distinct clusters with maximum separation at approximately \(k=7\)

5 Results

We apply the QG method to the problems of differentiating (a) epileptic from normal data, (b) EEG changes that precede a seizure and (c) EEG changes during a seizure. Since all time series are of equal length (\(T=4096\)), we used \(Q=2(4096)^{1/3}\approx 30\) and \(k=1,2,\ldots ,100\) in all computations. Thus, we mapped 500 signals into 50,000 quantile graphs (or 50,000 \(\mathbf {A_{k}}\) matrices), and therefore, we obtained 50,000 \(\mathbf {W_{k}}\) matrices with \(Q^2=900\) elements each. After that, for each set and for a specified k, we calculated the median over all \(\mathbf {A_{k}}\) matrices and obtained the weighted directed adjacency matrix of medians and the Markov transition matrix of medians.

For all sets, we computed \(C(k), L(k), \varDelta (k), M_o(k)\) and B(k) versus k using Eqs. (2), (3), (5), (6) and (7), respectively (Figs. 3, 4, 5, 6, 7). Observe in all cases that the curves for healthy (A and B) and epileptic (C and D) patients form two distinct clusters with maximum separation at approximately \(k=3\) for C(k) (Fig. 3), \(k=7\) for L(k) (Fig. 4), \(k=4\) for \(\varDelta (k)\) (Fig. 5), \(k=2\) for \(M_o(k)\) (Fig. 6) and \(k=1\) for B(k) (Fig. 7). In the first three cases, for \(k>30\), and in the last two cases, for \(k>10\), correlations between QG nodes disappear, and all curves almost merge into one.

Fig. 5
figure 5

\(\varDelta (k)\) versus k, which was computed using Eq. (5), \(Q=30, T=4,096\) and \(k=1,2,\ldots ,100\) for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure). In all cases, the curves for healthy (A and B) and epileptic (C and D) patients form two distinct clusters with maximum separation at approximately \(k=4\)

Fig. 6
figure 6

\(M_o(k)\) versus k, which was computed using Eq. (6), \(Q=30, T=4,096\) and \(k=1,2,\ldots ,100\) for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure). In all cases, the curves for healthy (A and B) and epileptic (C and D) patients form two distinct clusters with maximum separation at approximately \(k=2\)

Fig. 7
figure 7

B(k) versus k using Eq. (7), \(Q=30, T=4,096\) and \(k=1,2,\ldots ,100\) for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure). In all cases, the curves for healthy (A and B) and epileptic (C and D) patients form two distinct clusters with maximum separation at approximately \(k=1\)

Fig. 8
figure 8

Boxplots of C(k) for \(k=3\), which were computed over 100 segments each, for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure). As usual, the boxplots indicate, from bottom to top, the minimum, the first quartile, the median, the third quartile, and the maximum of the data. Boxplots from patients with different health conditions have different medians (shown as a line in the center of each box), which are 0.97, 0.99, 0.87, 0.88 and 0.93, for sets A, B, C, D and E, respectively

Fig. 9
figure 9

Boxplots of L(k) for \(k=7\), which were computed over 100 segments each, for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure). As usual, the boxplots indicate, from bottom to top, the minimum, the first quartile, the median, the third quartile, and the maximum of the data. Boxplots from patients with different health conditions have different medians (shown as a line in the center of each box), which are 3.04, 3.11, 2.52, 2.59 and 2.72, for sets A, B, C, D and E, respectively

Figures 8, 9, 10, 11 and 12 display boxplots of \(C(k), L(k), \varDelta (k), M_o(k)\) and B(k) that were computed over 100 segments for sets A, B, C, D and E, and \(k=3, k=7, k=4, k=2\) and \(k=1\), respectively. As usual, the boxplots indicate, from bottom to top, the minimum, the first quartile, the median, the third quartile, and the maximum of the data. Regardless of the network measure that was used, the QG method enables robust discrimination between healthy (sets A and B) and epileptic patients during a seizure interval (E) or not (sets C and D). Moreover, in all cases there is a statistically significant difference for a 95% confidence interval (CI) and a p-value of less than 0.05 between the corresponding sample means, which is more favorable between sets B and C and less favorable between sets A and D (Table 1). Receiver operating characteristic (ROC) analysis was performed, which is used here to quantify how accurately our map can discriminate between patients in two groups [24, 33]. Table 2 shows the areas under the ROC curves (AUCs) of the network measures \(C, L, \varDelta , M_o\) and B between patients in sets B and C and between patients in sets A and D. In all cases, the QG method performs very well in the differentiation between individuals with different health conditions. Overall, comparing the metrics that are used to discriminate the sets, \(\varDelta \), followed by C and \(M_o\), displays the best results.

Fig. 10
figure 10

Boxplots of \(\varDelta (k)\) for \(k=4\), which were computed over 100 segments each, for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure). As usual, the boxplots indicate, from bottom to top, the minimum, the first quartile, the median, the third quartile, and the maximum of the data. Boxplots from patients with different health conditions have different medians (shown as a line in the center of each box), which are 7.33, 9.07, 4.27, 4.59 and 6.50, for sets A, B, C, D and E, respectively

Fig. 11
figure 11

Boxplots of \(M_o(k)\) for \(k=2\), which were computed over 100 segments each, for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure). As usual, the boxplots indicate, from bottom to top, the minimum, the first quartile, the median, the third quartile, and the maximum of the data. Boxplots from patients with different health conditions have different medians (shown as a line in the center of each box), which are 0.10, 0.07, 0.23, 0.22 and 0.16, for sets A, B, C, D and E, respectively

Fig. 12
figure 12

Boxplots of B(k) for \(k=1\), which were computed over 100 segments each, for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure). As usual, the boxplots indicate, from bottom to top, the minimum, the first quartile, the median, the third quartile, and the maximum of the data. Boxplots from patients with different health conditions have different medians (shown as a line in the center of each box), which are 5.88, 5.37, 10.83, 9.19 and 6.34, for sets A, B, C, D and E, respectively

Table 1 Statistical comparison between the sample means of the network measures \(C, L, \varDelta , M_o\) and B for the sets B (healthy, eyes closed) and C (epileptic, opposite zone) and the sets A (healthy, eyes open) and D (epileptic, epileptogenic zone)
Table 2 Areas under the ROC curves (AUCs) of the network measures \(C, L, \varDelta , M_o\) and B between patients in sets B (healthy, eyes closed) and C (epileptic, opposite zone) and between patients in sets A (healthy, eyes open) and D (epileptic, epileptogenic zone) for \(k=3,7,4,2\) and 1, respectively

Figure 13 displays the Markov transition matrices of medians for \(k=4\) for illustrative purposes. It is evident that time series with different dynamics correspond to \(\mathbf {W_4}\) with different structures and differ in terms of how well the network topology mimics the properties of the corresponding time series. More specifically, for healthy subjects from set B (Fig. 13b), the weights in the corresponding \(\mathbf {W_4}\) are more uniformly distributed along its columns and rows compared to \(\mathbf {W}_4\) for healthy subjects from set A (Fig. 13a). For unhealthy subjects from set D (Fig. 13d), the higher weights in the corresponding \(\mathbf {W}_4\) are concentrated in its peripheral quantiles due to the rhythmic high-amplitude patterns that are found in the corresponding time series. Although Fig. 13c, d are similar, the fewer and less-pronounced interictal epileptiform activities that are found in set C (compared to set D) produce a Markov transition matrix with heavier weights. The high-amplitude and quasiperiodic patterns that are found in set E are depicted in a Markov transition matrix in which the heigher weights are mainly distributed over the secondary diagonal (Fig. 13e) [9].

Fig. 13
figure 13

QG transition matrices for sets A (healthy, eyes open), B (healthy, eyes closed), C (epileptic, opposite zone), D (epileptic, epileptogenic zone) and E (seizure), and \(k=4\). We use \(T=4096\) points of each time series and construct QGs using \(Q=30\) by applying the map \(\mathcal {M}_{QT}\). Time series with different dynamics correspond to \(\mathbf {W_4}\) with different structures. For healthy subjects from set B, the weights in the corresponding \(\mathbf {W_4}\) are more uniformly distributed along its columns and rows compared to \(\mathbf {W}_4\) for healthy subjects from set A. For unhealthy subjects from sets C and D, the higher weights in the corresponding \(\mathbf {W}_4\) are concentrated in its peripheral quantiles. In \(\mathbf {W}_4\), the higher weights are mainly distributed over the secondary diagonal for subjects from set E

6 Conclusions

The classification of EEG data using the concept of quantile graphs was presented in this paper. We have shown that the QG method can not only differentiate epileptic from normal data but also distinguish the different abnormal stages/patterns of a seizure, such as pre-ictal (EEG changes that precede a seizure) and ictal (EEG changes during a seizure). These results attest that the QG method is a useful tool for the analysis of nonlinear dynamics and able to detect differences in the data structures of physiological signals of healthy and unhealthy subjects.