# Classification of EEG Signals for Prediction of Epileptic Seizures
## 7 Results and Discussion  
This study proposes a patient-specific seizure prediction system using data from 22 subjects, including 17 males and 5 females. Scalp EEG signals were used to classify between interictal, which is the normal EEG state, and preictal, which is the state a few minutes prior to the beginning of the seizure, states. Preictal class samples were labeled as the positive class, so it is imperative to achieve higher TPR and low false positives. Sensitivity and specificity have been used to validate the proposed method and are computed using the the following equations:  
\[\text{Sensitivity}=\text{TP}/(\text{TP}+\text{FN}) \tag{18}\]  
\[\text{Specificity}=\text{TN}/(\text{TN}+\text{FP}) \tag{19}\]  
where TP stands for true positive, TN denotes true negative, FP is false positive, and FN represents false negative. The first experiment was devised to monitor the effects of different preprocessing techniques. Multiple experiments were performed to identify an optimal window size varying between 5 s to 120 s, and showed that a non-overlapping window of 30 s better characterizes the EEG signals. Therefore, a non-overlapping window (NOW) of 30 s was selected for both the interictal and preictal state segments. We then applied short time Fourier transform on the selected window, and no noise removal was done. Features were extracted using CNN, and the fully connected/dense layers at the end of the CNN were applied for classification. The results obtained in this setting are 64.5% sensitivity and 62.6% specificity. In the second experimental setting, bandpass/bandstop filtering was applied to remove line noise in the preprocessing, while the rest of the settings were kept the same as in the previous experimental setup. We applied Butterworth bandstop filters from 47-53 Hz and 109-112 Hz to remove line noise. Butterworth bandstop filters give a maximally flat response. A high-pass filter was also applied at 1 Hz to remove the DC component. In this experiment, 72.4% sensitivity and 70.3% specificity were achieved. In the third experiment, the filter setting was kept the same, and the issue of class imbalance was targeted. There is a class imbalance issue in the dataset as the ratio of interictal and preictal class samples is 10:1. With the help of an overlapping window (OW) for preictal state segments with an overlap of 15 s, the ratio can be reduced to 5:1. This oversampling greatly improved the results. NOW for interictal and OW for preictal classes (15 s overlap), bandpass filtering, CNN for feature extraction, and ANN for classification yielded the best results, with 78.3% sensitivity and 76.1% specificity. These settings were kept constant in subsequent experiments. Table 3 shows the different experimental settings and the results achieved in each experiment. The second experiment was devised to select the best automated feature extraction model. In the first iteration, we kept the preprocessing settings the same as the first experiment and selected the state-of-the-art Resnet-50, a deep neural network with 50 layers, for feature extraction. Residual learning was also introduced using skip connections. After feature extraction, classification was done using fully-connected layers. The results \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Preprocessing** & **Feature Extraction** & **Classification** & **Sensitivity** & **Specificity** \\ \hline NOW interictal, preictal, STFT & CNN & ANN & 64.5 & 62.6 \\ \hline NOW interictal–preictal, STFT, BPF/BSF & CNN & ANN & 72.4 & 70.3 \\ \hline NOW interictal, OW preictal (15 s overlap), TFT, BPF/BSF & CNN & ANN & 78.3 & 76.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Results of various preprocessing techniques used in the proposed system. obtained using this approach were not comparable to the state-of-the-art. A sensitivity of 67.4% and a specificity of 54.3% was achieved. In the second iteration, a much smaller network, Visual Geometry Group-16 was used.