# A Hybrid DenseNet-LSTM Model for Epileptic Seizure Prediction
## 4 Performance Evaluation
### Experimental Results  
In this section, we set the preictal lengths to 5, 10, and 15 min, respectively, and show the experimental results and comparison with the existing algorithm. Figure 9 shows the average Acc, Sen, Spec, FPR, F1-score over 5, 10, and 15 min of preictal lengths. In the experimental results, the model trained under the assumption that the preictal length of 5 min ensures a higher sensitivity than that of 10 and 15 min. This means that the model assumed to be 5 min trained the preictal interval better than other models, so the preictal characteristic appears a lot between 0 and 5 min. On the other hand, assuming that the preictal lengths are 10 and 15 min, the trained model has a higher specificity and lower FPR than 5 min. This means that the model trained to assume 10 and 15 min clearly distinguished the interval classified as interictal than other models. \begin{table}
\begin{tabular}{c c} \hline \hline
**Performance Indicator** & **Formula** \\ \hline Accuracy & (TP + TN)/(TP + TN + FP + FN) \\ Sensitivity (Recall) & TP/(TP + FN) \\ Specificity & TN/(TN + FP) \\ Precision & TP/(TP + FP) \\ False Positive Rate (FPR) & FP/(TN + FP) \\ F1-Score & 2 \(\times\) ((Precision \(\times\) Recall)/(Precision + Recall)) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Evaluation metrics (TP is true positive, TN is true negative, FP is false positive, FN is false negative). Figure 9: Average of accuracy, sensitivity, specificity, false positive rate and F1-score according to preictal lengths of 5, 10, 15 min. Table 5 shows the average Acc, Sen, Spec, FPR, and F1-score for each patient according to the preictal length. Looking at the results for each patient, the average sensitivity is high in the model assuming the preictal length of 5 min, but in the case of patient 4, the sensitivity is lower than 10 and 15 min and the specificity is high. It can be seen that the preictal characteristics did not appear well during 0-5 min and appeared after 5 min. On the other hand, in the case of patient 24, the sensitivity of the trained model was relatively lower than that of 5 min, assuming the preictal length was 10 and 15 min. This means that the preictal features were more pronounced at 0-5 min. In addition, the overall average result is best when the preictal length is assumed to be 5 min. However, the model that predicted the balanced outcome without significantly degrading the outcome for each patient was when the preictal length was 15 min. In order to objectively verify the performance of our proposed method, we compared it with the existing algorithms [22; 23; 24]. The authors of [22] proposed a method of converting EEG signals into image data through STFT and classifying them through CNN. In [23], an EEG signal is transformed into image data through CWT and uses CNN for classification. The authors of [24] predicted seizures using features obtained through Hjorth parameters as input to 3D-CNN. As shown in Figure 10 and Table 6, the proposed method has better performance than the existing method. This means that the proposed model is different from the CNN used in the existing algorithm, using the improved DenseNet method and reinforcing the information flow throughout the network, so that the learning was effective. In addition, it can be said that \begin{table}
\begin{tabular}{l c c c c c c c c c c c c} \hline \hline
**Authors** & **Year** & **Datasets** & **Features** & **Classifier** & **Acc (\%)** & **Sen (\%)** & **Spec (\%)** & **FPR (\(\Omega\))** & **F1-Score** \\ \hline [PERSON] et al. [23] & 2017 & CHB-MIT, 15 patients & Continuous wavelet transform & CNN & - & 87.8 & - & 0.147 & - \\ [PERSON] et al. [22] & 2018 & CHB-MIT, 13 patients & Short-time Fourier transform & CNN & - & 81.2 & - & 0.16 & - \\ [PERSON] et al. [24] & 2019 & CHB-MIT, 16 patients & Hybrid parameters & 3D CNN & - & 85.71 & - & 0.096 & - \\ This work & 2021 & CHB-MIT, 24 patients & Discrete wavelet transform & DenseNet-LSTM & 93.28 & 92.92 & 93.65 & 0.063 & 0.923 \\ \hline \hline \end{tabular}
\end{table}