# Online EEG Seizure Detection and Localization
## 3 Results  
The performance of the proposed algorithm was evaluated for temporal seizure detection by applying it to the CHB-MIT dataset. Most studies that have used this dataset have focused on the ages between 4 and 21 years old, which is what we did also. Therefore, patients 4, 6, 10, 12, and 13 were excluded from the seizure detection algorithm and further analyses. Although patient 8 was 3.5 years old, their EEG recordings were included in the evaluation. Additionally, for the spatial seizure detection evaluation, the algorithm was also applied to the Karunya dataset.  
The temporal performance of the proposed algorithm was evaluated using two metrics: true positive rate (TPR) or sensitivity (\((\frac{\text{detected seizures}}{\text{total seizures}})\times 100\)), and false positives per hour (FPH). Furthermore, detection latency was also calculated for the detected seizures. Table 3 summarizes the results for each patient individually.  
Figure 5 illustrates the number of seizures, true positives (TPs) (number of correctly predicted seizures), and false negatives (FNs) (number of missed true seizures) for each individual patient. As mentioned in Section 2.1, PBI normalization requires at least 3 min of EEG recording; therefore, the events prior to the first 3 min of an EEG record cannot be evaluated. Patients 17 and 24 had one seizure activity which ended before the third minute of the recording; hence, those events were removed from the dataset. Patient 2 had seizure activity between 130-212 s of the recording. Although the activity started prior to the third minute of the recording, our algorithm detected it at the 180 th second, which affected the detection latency period. Therefore, the beginning of the seizure is assumed to be at that time to fix the negative effect on the detection latency; otherwise, it would contain a 50 s latency. The adaptive coefficient (\(\alpha\)) was set to 5. The boxplots in Figure 6a-c represent the overall performance of the proposed algorithm and illustrate the median, outliers, and ranges of the performances. Table 4, which summarizes the detailed results of Table 3, contains the overall temporal performances of the proposed approach.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Patient** & **\# Seizures** & **TP1** & **TPR** &
\begin{tabular}{c} **False Positives/hour** \\ **(FPH)** \\ \end{tabular} & **Detection Latency** \\ \hline  
\hline \hline \end{tabular}  
* TP (true positive) is the number of correctly detected seizures, and TPR (true positive rate).  
\end{table}
Table 3: CHB-MIT results.  
Figure 5: Results of the CHB-MIT dataset contains the number of seizures, the true positives (TP), and false positives (FP) for each patient.  
Figure 6: Temporal performance of the proposed algorithm: (**a**) TPR, (**b**) FP/hour, and (**c**) detection latency.  
The evaluation of the spatial performance of the proposed algorithm was based on the concurrence of the labeled seizure origins in the Karuniya dataset with the localization results of the algorithm. Table 5 summarizes the spatial performance of the proposed approach on the Karuniya dataset. Seizures of generalized or focal types were analyzed. Additionally, if the localized seizure lobe in the right, left, and central regions concurred with the focus of the seizure annotated by the dataset, the localization was counted as a correct localization. The second and third columns in Table 5 contain the total number of the EEG records and the ones that were correctly localized. The last column shows the sensitivity (TPR) measures for seizure type determination and region localization.