# A Hybrid DenseNet-LSTM Model for Epileptic Seizure Prediction
## 4 Performance Evaluation  
### Experimental Setup  
This section describes the workstation environment, hyperparameters of DenseNet-LSTM, experimental methods, and evaluation indicators. As shown in Table 2, AMD Ryzen 7 3700X was used as the CPU, and a total of 64 GB of memory was used. The proposed model was trained using GeForce RTX 2080 Ti as GPU. The software is experimented with using Python 3.6 version, Tensorflow 1.14, and Keras 2.2.4 version. As a hyperparameter of DenseNet-LSTM, as shown in the Table 3, the growth rate was set to 32, and the compression factor was set to 0.5. For the activation function, ReLU was used, [PERSON] was selected as the optimizer, and the learning rate was set to 0.001.  
The experimental method is performed using the k-fold cross-validation method. K-fold cross-validation divides the data into k folds, trains with \(\text{k}-1\), and tests with the remaining one. The average of the result values obtained by repeating this process k times is used as the verification result of the model.  
In order to evaluate the seizure prediction performance of the model, accuracy, sensitivity, specificity, and FPR (False prediction rate), F1-score calculated as shown in Table 4  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Layers** & **Feature Map Size** & **Configuration** \\ \hline Convolution Layer & \(3\times 1280\times 64\) & \(7\times 7\ conv\), stride 2 \\ Dense Block 1 & \(2\times 640\times 256\) & \(\begin{bmatrix}1\times 1&conv\\ 3\times 3&conv\end{bmatrix}\times 6\) \\ Transition Layer 1 & \(2\times 640\times 128\) & \(1\times 1\ conv\) \\  & \(1\times 320\times 128\) & \(2\times 2\) average pooling, stride2 \\ Dense Block 2 & \(1\times 320\times 512\) & \(\begin{bmatrix}1\times 1&conv\\ 3\times 3&conv\end{bmatrix}\times 12\) \\ Transition Layer 2 & \(1\times 320\times 256\) & \(1\times 1\ conv\) \\  & \(1\times 160\times 256\) & \(2\times 2\) average pooling, stride2 \\  & \(1\times 256\) & global average pooling \\ LSTM Layer & \(4\times 64\) & reshape \\  & \(1\times 128\) & LSTM layer \\ Classification Layer & \(1\times 1\) & sigmoid \\ \hline \hline \end{tabular}
\end{table}
Table 1: Structure of DenseNet-LSTM.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Software or Hardware** & **Specification** \\ \hline CPU & AMD Ryzen 7 3700X \\ GPU & GeForce RTX 2080 Ti \\ RAM & DDR4 64 GB \\ Python & 3.6 \\ Tensorflow & 1.14 \\ Keras & 22.4 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Workstation configuration.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Hyperparameters** & **Values** \\ \hline Growth rate & 32 \\ Compression factor & 0.5 \\ Activation function & ReLU \\ Optimizer & Adam \\ Learning rate & 0.001 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Hyperparameter configuration.  
are used as performance indicators. Accuracy represents the proportion of correctly classified data in the entire dataset. Sensitivity represents the ratio accurately predicted as preictal among data classified as preictal. Specificity refers to the ratio predicted by the actual interictal among data classified as interictal, and FPR refers to the ratio of incorrectly judging the interictal as preictal states. Precision is the ratio of really true among true predicted values. F1-score represents the harmonic average of precision and recall.