One Dimensional Convolutional Neural Networks Combined with Channel Selection Strategy for Seizure Prediction Using Long-term Intracranial EEG

Seizure prediction using intracranial electroencephalogram (iEEG) has attracted an increasing attention during recent years. iEEG signals are commonly recorded in the form of multiple channels. Many previous studies generally used the iEEG signals of all channels to predict seizures, ignoring the consideration of channel selection. In this study, a method of one dimensional convolutional neural networks (1D-CNN) combined with channel selection strategy was proposed for seizure prediction. Firstly, we used 30-sec sliding windows to segment the raw iEEG signals. Then, the 30-sec iEEG segments, which were in three channel forms (single channel, channels only from seizure onset or free zone and all channels from seizure onset and free zones), were used as the inputs of 1D-CNN for classiﬁcation, and the patient-speciﬁc model was trained. Finally, the channel form with the best classiﬁcation was selected for each patient. The proposed method was evaluated on the Freiburg Hospital iEEG dataset. In the situation of seizure occurrence period (SOP) of 30 min and seizure prediction horizon (SPH) of 5 min, 98.60% accuracy, 98.85% sensitivity and 0.01/h false prediction rate (FPR) were achieved. In the situation of SOP of 60 min and SPH of 5 min, 98.32% accuracy, 98.48% sensitivity and 0.01/h FPR were attained. Compared with the many existing methods using the same iEEG dataset, our method showed a better performance.


Introduction
Epilepsy is a chronic neurological disease, which predisposes a person to recurrent seizures.About 50 million people suffer from epilepsy, and 30% of them are resistant to anti-epileptic drugs. 1,2 linical refractory epilepsy is commonly associated with the risks † † Corresponding authors of fainting, injury and death. 3Electroencephalogram (EEG) has become a powerful technique in epilepsy diagnosis, [4][5][6] and many EEG-based methods, including threshold analysis, 7,8 Support Vector Machine (SVM), 9,10 k-Nearest Neighbor (KNN), 11 Random Forest (RF), 12 Linear Classifier 13 and deep learning, [14][15][16] have been successfully applied for seizure detection.However, seizure prediction using EEG remains one of the main challenges.The accurate prediction of seizures and timely interventions can greatly reduce the suffering of epilepsy patients.The previous EEG-based seizure prediction methods mainly consisted of threshold analysis, conventional machine learning and deep learning.
Firstly, the methods of linear or nonlinear features combined with threshold analysis were applied to the seizure prediction.Maiwald et al. used the dynamical similarity index as the nonlinear feature and evaluated the approach on the Freiburg Hospital intracranial electroencephalogram (iEEG) dataset. 17A sensitivity of 42% and a false prediction rate (FPR) of less than 0.15/h were achieved. 17With the same iEEG dataset, Winterhalder et al. combined phase and lag synchronization measure to evaluate the changes of iEEG synchronization and obtained a result of 60% sensitivity and 0.15/h FPR. 18Based on the combination of bivariate empirical mode decomposition and Hilbert transformation, Zheng et al. calculated the mean phase coherence from multiple iEEG channels.This method achieved a sensitivity of more than 70% and a FPR of less than 0.15/h. 19Then, Eftekhar et al. combined symbol dynamics methodologies with an N-gram algorithm for seizure prediction and obtained 90.95% sensitivity and 0.06/h FPR. 20Aarabi et al. extracted correlation dimension, correlation entropy, noise level, Lempel-Ziv complexity, largest Lyapunov exponent and nonlinear interdependence as the features, and the rulebased decision making technique was used for classification.The proposed method obtained a better result of 92.9% sensitivity and 0.096/h FPR in the situation of seizure occurrence periods (SOP) of 50 min and seizure prediction horizon (SPH) of 10 s. 21lthough the performances of the threshold analysis methods have been improved to some extent, there is still room for the further improvement.
Secondly, the conventional machine learning methods were also used for seizure prediction.Park et al. used the SVM to classify the feature samples extracted from nine frequency bands of iEEG signals.
The method was evaluated on the Freiburg Hospital iEEG dataset, and a sensitivity of 97.5% and a FPR of 0.27/h were achieved. 22Williamson et al. calculated the principal components from the eigenspectra of space-delay correlation and covariance matrices for feature extraction.The SVM finally predicted 71 out of 83 seizures (85.54% sensitivity) with a FPR of 0.03/h using the same iEEG dataset. 23Ozdemir et al. used Hilbert-Huang transform for feature extraction and Bayesian network for classification.A result of 96.55% sensitivity and 0.21/h FPR was obtained. 24hen, Parvez et al. extracted phase-match error, deviation and fluctuation as the features and used Least Square-Support Vector Machine (LS-SVM) for classification.The method attained a result of 95.4% sensitivity and 0.36/h FPR. 25 Based on the analysis of ictal rules on Poincaré plane for feature extraction, Sharif et al. applied the SVM for classification and achieved a sensitivity of 91.8% to 96.6% and a FPR of 0.05/h to 0.08/h. 26Although the conventional machine learning methods were used in the seizure prediction, the feature extraction and selection of iEEG signals was a time-cosuming engineering, and it also had the low generalization.Therefore, the feature engineering techniques were commonly complex in the analysis of iEEG signals for seizure prediction.
Recently, deep leaning techniques have shown excellent performances in image recognition, 27,28 image retrieval, 29 multi-object tracking 30,31 and foreground detection, 32,33 and iEEG-based deep learning techniques have also been applied for seizure prediction.Truong et al. used Short-Time Fourier Transform (STFT) to attain the iEEG time-frequency input maps and utilized Two Dimensional Convolutional Neural Networks (2D-CNN) with three convolution blocks for classification.Three datasets, the Freiburg Hospital iEEG dataset, 17 the CHB-MIT scalp electroencephalogram (sEEG) dataset 34 and the American Epilepsy Society Seizure Prediction Challenge iEEG dataset, 35 were evaluated with the proposed method.This method finally achieved 81.4%, 81.2% and 75% sensitivity and 0.06/h, 0.16/h and 0.21/h FPR, respectively. 36Truong et al. also applied Generative Adversarial Networks (GAN) for the seizure forecasting and attained the operating characteristic curve (AUC) of 75.47 % using the Freiburg Hospital iEEG dataset. 37 blocks to classify the channel-frequency input maps that were obtained by using Directed Transfer Function (DTF).The method attained 90.8%sensitivity and 0.08/h FPR. 38 Although the many previous studies used the iEEG to explore the prediction of seizures, most of them used all channel iEEG signals, ignoring the consideration of iEEG channel selection.Whether iEEG signals of all channels are conducive to the seizure prediction has not been studied well.iEEG signals are commonly recorded in the form of multiple channels (or electrodes), and the electrodes usually record iEEG signals from multiple zones of the brain, including seizure onset zones and seizure free zones.Therefore, the iEEG channel selection is needed and significant for a better prediction of seizures.Based on the above considerations, in this work, we explored the seizure prediction with a iEEG channel selection strategy.Three channel cases (single channel, channels only from seizure onset or free zone and all channels from seizure onset and free zones) combined with the corresponding One Dimensional Convolutional Neural Networks (1D-CNN) were studied and discussed.Then, the channel case with the best classification was finally selected for each patient.In the seizure prediction, the time duration of iEEG signals before seizure onset is needed to be defined as the preictal period.After defining two different preictal periods, the proposed method was evaluated on each preictal period.

Data preparation
The Freiburg Hospital iEEG dataset (http://epilepsy.uni-freiburg.de/)was used for the analysis of seizure prediction in this work .The iEEG dataset consisted of 21 patients, with a total of 87 seizures, 509 h of interictal and 73 h of preictal or ictal iEEG signals.
Each patient contained at least 24 h of interictal and 50 min of preictal iEEG signals.The iEEG signals were recorded with the sampling rate of 256 Hz, and a bandpass filter between 0.5 and 120 Hz and a 50 Hz notch filter were used to eliminate the possible noise. 17More details about this iEEG dataset were described in [17].
In the seizure prediction, it is to explore the distinction between interictal stage and preictal stage (as shown in Fig. 1).It means that the time durations of SPH and SOP need to be defined.SOP is defined as the period during which a seizure is expected to occur.SPH is the period between the alarm and the beginning of SOP. 40The SPH is also called the intervention time. 41In real-world conditions, the time duration of SPH should be long enough for potential interventions to prevent seizure onset.In this work, the time duration of SPH was set to 5 min, 36,38,42,43 while we discussed two different durations of SOP, namely 30 min and 60 min.According to the two different durations of SOP, the final selected iEEG signals and their details were summarized in Table 1.

Methodology
In the Freiburg Hospital iEEG dataset, the iEEG signals of each patient are recorded using six recording channels, three of which are in-focus channels (from seizure onset zones of the brain, denoted channels 1-3), and the other three are out-of-focus channels (from seizure free zones of the brain, denoted channels 4-6).Based on the iEEG dataset, we discuss three cases about the use of different iEEG channels.
The proposed method based on the channel-based 1D-CNN for seizure prediction is showed in Fig. 2. Case 1 shows that only one channel (channel 1 to 6, each channel in turn) is used for the prediction of seizures.Case 2 shows that three channels (in-focus channels 1-3 or out-of-focus channels 4-6) are used at the same time.Case 3 shows that all channels (channels 1-6) are used simultaneously.The best channel case is finally selected for each patient according to the classification results.

Preprocessing
We used 30-sec sliding widows to segment the longterm raw iEEG signals.For one 30-sec iEEG segment with the sampling rate of 256 Hz, it can be seen as a vector or matrix of n×7680, where n (n = 1, 3 and 6) is the number of the selected channels.The 30-sec iEEG segments are used as the inputs of the proposed 1D-CNN.
As shown in Table 1, the time duration of interictal iEEG signals is about 24 hours, while that of preictal iEEG signals ranges from about 2 to 5 hours (depending on the number of seizures of each patient).It means that the sample imbalance is a key problem in this work.In order to solve the problem during the model training phase, an overlapped sliding window technique was used. 36,38 e used 30-sec sliding windows without overlap to segment interictal iEEG signals.However, for preictal iEEG signals that were selected as the training set, we used 30-sec sliding windows with the corresponding overlap rate to generate more preictal segments.Fig. 3 shows the details of the oversampling technique.

Convolutional neural network (CNN)
CNNs have achieved the remarkable results in the seizure detection, [44][45][46][47] the seizure control 48 and the detection of interictal epileptiform discharges. 49A CNN model generally consists of convolution layers, pooling layers and fully connected layers.A convolution layer performs convolution calculations on input signals, and the convolution results are then nonlinearized by activation functions.In this work, the rectified linear activation unit (ReLU) function was used in the convolution layers.A pooling layer commonly performs pooling operations on the outputs of a convolution layer to preserve higher-level representations.In our 1D-CNN model, pooling processes, including maximum pooling and global average pooling, were used.After passing through convolutional layers and pooling layers, the outputs are usually fed into fully connected layers for the final classification.
In this work, the proposed 1D-CNN model is showed in Fig. 4. Our model has four convolutionblock layers and two fully connected layers.The first two convolution-block layers contain four convolution blocks.For the two convolution blocks on the left, the first convolution block contains a convolution layer (32 kernels with the size of n×3 and the stride of 2), a batch normalization (BN) layer and a max-pooling (MP) layer (the pooling size of 3 and the stride of 2), and the second convolution block also contains a convolution layer with 32 kernels with the size of 3  In order to accurately predict seizures and issue alarms, the postprocessing for the outputs of 1D-CNN was performed (as shown in Fig. 4).The condition for an alarm to sound is that L consecutive predicted labels are positive.In this work, the L value was finally set to 4 after many tests.For avoiding unnecessary repetitive alarms, when the first alarm sounds, the second alarm can only sound after the end of SOP.Hence, the second alarm in the period from the moment the first alarm sounds to the end of SOP is prohibited by the system.

Model training
The patient-specific model was trained for each patient.In order to predict all seizures of each patient, the approach of leave-one-out cross validation was applied.It means if a patient has K seizures, the model training is performed K rounds.In each round, (K-1) seizures are used for training, and the remaining one is used for testing.All seizures can be predicted after K rounds.Fig. 5 shows the details of the leaveone-out cross validation.As shown in Fig. 5, in each round, we also increased the preictal training samples by using the oversampling technique mentioned in the preprocessing (Section 2.2.1), and the number of segments reserved for training and testing was summarized in Table 2.
During model training, the Early-Stopping technique was also applied to prevent overfitting, and the dropout rate of second fully connected layer was set to 0.

System evaluation
We evaluated the performances of the proposed method in the two levels (the segment-based level and the event-based level) at the same time.Combining the results of the two levels, we finally selected the best channel case for each patient.
• Segment-based level In the segment-based level, the accuracy of sample classification is calculated.The accuracy is expressed as following: where T P is true positive, indicating the number of true predicted preictal segments from preictal segments, and T N is true negative, indicating the number of true predicted interictal segments from interictal segments.
• Event-based level In the event-based level, sensitivity and FPR are calculated, and the definitions of them are proposed in [40].The sensitivity and the FPR are expressed by the following formulas: An excellent system is supposed to sound alarms with higher sensitivity and lower FPR.
For testing statistical significance of the proposed method, it needs to be compared with the random predictior.The probability of a random alarm can be defined as: 50,51 where FPR and SOP are false prediction rate and seizure occurrence period, respectively.Therefore, the probability of randomly predicting at least k out of K independent seizures can be expressed as following: where k is the number of the predicted seizures, and K is the number of all seizures.In this study, the significance level is set to 0.05.It means when the calculated p −value is less than 0.05, our method is better than the random prediction.

Results
The proposed method with three channel cases (single channel, three channels and all channels) is evaluated on two different preictal periods: (1) SOP of 30 min and SPH of 5 min; (2) SOP of 60 min and SPH of 5 min.The whole algorithm runs twice, and the averaged results of the two levels are calculated for the further analysis.
According to the results of the segment-based level and the event-based level, the selection criteria for the best channel case are defined as following: (1)  We first select the best channel situation according to the sensitivity and FPR (the event-based level); (2) If a patient has the same sensitivity and FPR under several channel situations, we then combine the accuracy (the segment-based level) of these chan-  nel situations to finally determine the best channel situation.
1D-CNN combined with channel selection strategy for seizure prediction 9

SOP of 30 min and SPH of 5 min
In the event-based level, the averaged results (sensitivity and FPR) are reported in Fig. 6.Each subfigure in Fig. 6 shows the sensitivity and FPR of each patient under nine channel situations (1, 2, 3, 4, 5, 6, 1-3, 4-6 and 1-6).For example, patient 20 obtains the same sensitivity and FPR from channels 3, 4, 5, 1-3, 4-6 and 1-6 (as shown in Fig. 6).Based on the selection criteria for the best channel case, we then calculate the accuracy of these channel situations, and the best channel situation (channels 1-3) is determined due to the highest accuracy of 98.20±0.19%(as shown in Fig. 8(a)).After selecting the best channel situation for each patient, we summarize the corresponding sensitivity, FPR and accuracy in Table 3.As shown in Table 3, in the event-based level, 86 out of 87 seizures are accurately predicted, with a sensitivity of 98.85%.The FPR is low at 0.01/h.From the p −value of each patient, we can see that the performance of the proposed method is much better than that of the random prediction.In the segmentbased level, the accuracy of 19 patients is higher than 97%.The accuracy rates of the other two patients (patients 5 and 18) are at 95.58% and 92.80%, respectively.The averaged accuracy of 21 patients is 98.60%, which shows that our method can classify interictal and preictal segments well.

SOP of 60 min and SPH of 5 min
In this preictal period, patients 2 and 6 are excluded, and so total 19 patients are analyzed.Fig. 7 shows the averaged sensitivity and FPR of 19 patients.Each subfigure in Fig. 7 also shows the sensitivity and FPR of each patient under nine channel situations.According to the selection criteria for the best channel case, the best channel situation is selected for each patient.For example, patient 20 attains the best result also with the channel situation of 1-3 (as shown in Fig. 8(b)).For each patient, the best channel situation and the corresponding sensitivity, FPR and accuracy are summarized in Table 4.
As shown in Table 4, 65 out of 66 seizures are accurately predicted by the proposed method.The high sensitivity of 98.48% and the low FPR of 0.01/h are obtained (the event-based level).According to the calculated p −value of each patient, our method is much better than the random prediction in the seizure prediction.In the segment-based level, 17 patients have an accuracy of more than 97%, and the accuracy rates of patients 5 and 13 are 91.19% and 96.12%, respectively.The averaged accuracy of 19 patients is 98.32%.

Channel selection
Based on the results in Table 3 and Table 4, there are several points that we need to explain.Firstly, none of the 21 patients achieves the best result using all channel (channels 1-6) iEEG signals.From this point, we can see that the channel selection for each patient is necessary.Secondly, most patients attain the best results when only using single-channel rather than multi-channel iEEG signals.Thirdly, under two preictal periods, namely SOP of 30 min and SOP of 60 min with the same SPH of 5 min, most patients have the same channel selection in obtaining the best results, and so it shows the reliability of the results and the stability of the proposed method.
According to the results in Table 3 (SOP of 30 min and SPH of 5 min) and Table 4 (SOP of 60 min and SPH of 5 min), we also count the number of patients corresponding to two types of channel conditions.As shown in Fig 9, the number of patients with channels selected only from the seizure onset zones is slightly more than that of patients with channels selected only from the seizure free zones.However, the number of patients with channels selected from both zones is zero.Based on the findings, we can have the following two thoughts: (1) The iEEG signals recorded from the seizure free zones are important in the seizure prediction, and their predictive performance is sometimes better than the iEEG signals recorded from the seizure onset zones; (2) In the prediction of seizures, all channel iEEG signals are not necessarily valid and channel selection is necessary.Fig. 9.In two different preictal periods, the number of patients with the different channel conditions.

Discussion
CNNs have been used for the prediction of seizures in [36], [38] and [56], while the studies used all channel iEEG signals, ignoring the channel selection.8][59][60] Hence, in this work, we proposed a method of 1D-CNN combined with channel selection strategy for seizure prediction.From the perspective of incremental learning, the iEEG signals with a channel increase strategy (from single channel to multiple channels, and then to all channels) were used as the inputs of 1D-CNNs with the same structure.The patient-specific model was then trained, and the best channel case was selected for each patient according to the classification results.From the results in Table 3 and Table 4, we achieved high accuracy (98.60% and 98.32%), high sensitivity (98.85% and 98.48%) and low FPR (0.01/h and 0.01/h).It indicated that our method was effective and had well performance in using the long-term iEEG signals to predict seizures.
We also compared the results of this work and the previous studies using the Freiburg Hospital iEEG dataset.The details of the previous studies and this work, including the total number of seizures, fea-ture extraction methods and classifiers, were given in Table 5.The four significant metrics related to seizure prediction, namely sensitivity, FPR, SOP and SPH, were also given in Table 5.As shown in Table 5, the methods of threshold analysis combined with linear or nonlinear features achieved the sensitivity ranging from 42% to 92.9% and the FPR ranging from 0.06/h to 0.15/h. 17-21, 52, 55The highset sensitivity (92.9%) was attained in the study [21], but the study only used 10 patients for the analysis of seizure prediction.The conventional machine learning methods, including SVM, 22,23,26,53,54 LS-SVM 25 and Bayesian 24 , were used for the prediction of seizures.The sensitivity and the FPR obtained by these methods ranged from 85.5% to 100% and 0.03/h to 0.36/h, respectively.The SVM in the study [54] achieved the highest sensitivity of 100% with the FPR of 0.0324/h.The deep learning methods, including 2D-CNN 36,38 and GAN, 37 combined with the preprocessing techniques (STFT and DTF) were used to analyze the same iEEG dataset, and the sensitivity ranging from 81.4% to 90.8% and the FPR ranging from 0.03/h to 0.08/h were attained.The 2D-CNN used in the study [38] achieved the highest sensitiivty of 90.8% with the FPR of 0.08/h.
Compared with the results in Table 5, our method achieved high sensitivity (98.85% and 98.48%) and low FPR (0.01/h and 0.01/h), which showed that the performances of our method were better than that of most previous studies.Although the sensitivity of 100% and the FPR of 0.03 were obtained in the study [54], the authors ignored the actual clinical considerations by setting SPH to zero, and they also used the time-consuming and complex feature selection for each patient.
In this work, the Freiburg Hospital iEEG dataset is recorded with three in-focus channels (channels 1-3) and three out-of-focus channels (channels 4-6).Consequently, the number of the combinations of channels is 63 ).One limitation of this work is that our method discusses nine channel combinations (1, 2, 3, 4, 5, 6, 1-3, 4-6 and 1-6) for seizure prediction.Therefore, more subsets of channels can to be selected and tested.In the future work, all the channel combinations combined with deep learning approaches will be further analyzed and discussed.The second limitation is that our work only uses a 1D-CNN model combined with the channel selection strategy for the classification of combined with the channel selection strategy can also be applied to the same iEEG dataset for seizure prediction.
1D-CNN combined with channel selection strategy for seizure prediction 13

Conclusion
In this paper, a novel method of 1D-CNN combined with channel selection strategy was proposed for the prediction of seizures.Different from the many previous studies only using all channel iEEG signals, the iEEG signals of single channel, multiple channels and all channels were classified using a 1D-CNN model with four convolution-block layers.Then, according to the results of classification, the channel case with the best classification result was finally selected for each patient.
The proposed method was evaluated on the Freiburg Hospital iEEG dataset recorded with three in-focus channels (channels 1-3) and three out-offocus channels (channels 4-6), and the iEEG signals of nine channel situations (1, 2, 3, 4, 5, 6, 1-3, 4-6 and 1-6) were analyzed to select the channel case with the best classification for each patient.Our method successfully predicted 86 out of 87 seizures (except one seizure in patient 13).The overall results, (1) 98.60% accuracy, 98.85% sensitivity and 0.01/h FPR in the SOP of 30 min and SPH of 5 min; (2) 98.32% accuracy, 98.48% sensitivity and 0.01/h FPR in the SOP of 60 min and SPH of 5 min, were achieved.Compared with the many previous studies using the same iEEG dataset, our method showed a better performance in the seizure prediction.Our method was also statistically better than the random prediction for all patients in the Freiburg Hospital iEEG dataset.

Fig. 1 .
Fig. 1.The four stages of epileptic iEEG: interictal, preictal, ictal and postictal, and the definition of an accurate seizure prediction.When an alarm rings, a seizure must occur after SPH and within SOP.
Daoud et al. used four deep learning models, including Multi-Layer Perceptron (MLP), Deep Convolutional Neural Network (DCNN) + MLP, DCNN + Bidirectional Long Short-Term Memory and Deep convolutional Autoencoder (DCAE) + Bi-LSTM, for the analysis of seizure prediction.The DCNN + Bi-LSTM model and the DCAE + Bi-LSTM model finally obtained the highest accuracy of 99.6% and the lowest FPR of 0.004/h, but the sEEG signals of only eight patients from the CHB-MIT sEEG dataset were used.39

Fig. 2 .
Fig.2.The architecture of the proposed method for seizure prediction.The iEEG signals of three channel cases (one channel, three channels and six channels) are classified using the 1D-CNN model.Then, the channel case with the best classification is finally selected for each patient.

Fig. 3 .
Fig. 3.For interictal iEEG signals, we use 30-sec sliding windows without overlap.For preictal iEEG signals that were selected as the training set, we use 30-sec sliding windows with the corresponding overlap rate.

Fig. 5 .
Fig.5.Leave-one-out cross validation: in each round, (K-1) seizures are used for training, and the remaining one is used for testing.All seizures can be predicted after K rounds.In each round, the oversampling technique is also applied to increase the preictal training samples.

Fig. 6 .
Fig.6.In the event-based level with SOP of 30 min and SPH of 5 min, each subfigure shows the averaged sensitivity and FPR of each patient under the nine channel situations (1, 2, 3, 4, 5, 6, 1-3, 4-6 and 1-6).The best channel situation is selected for each patient.The left blue Y-axis and the right red Y-axis represent the FPR and the sensitivity, respectively.

Fig. 7 .
Fig. 7.In the event-based level with SOP of 60 min and SPH of 5 min, each subfigure shows the averaged sensitivity and FPR of each patient under the nine channel situations (1, 2, 3, 4, 5, 6, 1-3, 4-6 and 1-6).The best channel situation is selected for each patient.The left blue Y-axis and the right red Y-axis represent the FPR and the sensitivity, respectively.

Fig. 8 .
Fig.8.The example of patient 20 includes both eventbased and segment-based results for the selection of the best channel situation.According to the results in the conditions of SOP = 30 min and SOP = 60 min, the best channel situation of channels 1-3 is finally selected.

Table 1 .
The details of the selected iEEG signals for each patient + When SOP = 60 min and SPH = 5 min are defined, preictal iEEG signals with the time duration of at least 65 min can be selected.
the stride of 2, a BN layer and a MP layer with the pooling size of 3 and the stride of 2. The structure of the two convolution blocks on the right is the same as that of the two convolution blocks on the left.
The proposed 1D-CNN is showed.M @n×k 1 or M @k 2 : M is the number of kernels, n×k 1 and k 2 are the sizes of kernels.Abbreviations: Conv, convolution; BN, batch normalization; MP, max-pooling; s 1 , pooling size; s 2 , stride; GAP, global average pooling; FC, fully connected.L is the number of consecutive prediction labels for an alarm.and a BN layer and a MP layer with the pooling size of 3 and the stride of 1.The fourth convolution-block layer also has one convolution block including a convolutional layer (256 kernels with the size of 3 and the stride of 1), a BN layer and a MP layer (the pooling size of 3 and the stride of 1).The outputs of the fourth convolution-block layer are globally averaged as the inputs of the two fully connected layers.The first and the second fully connected layers have 256 neurons with ReLU function and 2 output neurons with Softmax function, respectively.

Table 2 .
During model training with the leave-one-out cross validation, in each round, the number of segments reserved for training and testing is summarized as below.

Table 3 .
The results of our method with SOP of 30 min and SPH of 5 min.The whole algorithm runs twice.After selecting the best channel situation, the averaged results (accuracy, sensitivity and FPR) and the p −value are given for each patient.Cs means channel selected for the best classification; a Channels only from seizure onset zones of the brain; b Channels only from seizure free zones of the brain.

Table 4 .
The results of our method with SOP of 60 min and SPH of 5 min.The whole algorithm runs twice.After selecting the best channel situation, the averaged results (accuracy, sensitivity and FPR) and the p −value are given for each patient.Cs means channel selected for the best classification; a Channels only from seizure onset zones of the brain; b Channels only from seizure free zones of the brain.

Table 5 .
64e list of previous studies and this work using the Freiburg Hospital iEEG dataset for seizure prediction.Abbreviations: SEN, sensitivity; FPR, false prediction rate; SOP, seizure occurrence period; SPH, seizure prediction horizon; SVM, support vector machine; LS-SVM, least square-SVM; STFT, short-time Fourier transform; DTF, directed transfer function; 2D-CNN, two dimensional convolutional neural network; GAN, generative adversarial networks; 1D-CNN, one dimensional convolutional neural network c SPH is also called the intervention time.When SPH is set to zero, it means that the time left for clinical intervention is zero, ignoring actual clinical considerations.theiEEGsignals.Other deep learning and machine learning algorithms, such as 2D-CNN and LSTM, Enhanced Probabilistic Neural Network,61Neural Dynamic Classification Algorithm,62Dynamic Ensemble Learning Algorithm63and Finite Element Machine,64