# Online EEG Seizure Detection and Localization
## 2 Materials and Methods  
Figure 1 is a flowchart of the proposed algorithm. The main steps in the workflow are the computation of power in a band of interest (PBI), the calculation of distances in the network of electrodes (DN), and the computation of correlation within the network (CN). The EEG signals are  
divided into 10 s epochs with a 5 s overlap between epochs. The signals in each epoch are preprocessed to remove the DC offset and the 60 Hz line noise. These processed signals are decomposed into the frequency bands specified in Table 1 using the fast Fourier transform (FFT).  
Previous studies, such as [PERSON] et al. [24], used all frequency bands when studying the EEG signals, while other studies, such as those of [PERSON] and [PERSON] [25], used a limited frequency range (0.5-25 Hz). In the normal brain state, the power in the delta band has the largest variance [26]. The beta band activity corresponds to the performance of motor tasks and the performance of cognitive tasks with sensorimotor interactions [27]. Thus, the beta band activity varies based on the task in progress. Therefore, capturing the transition from the normal state to abnormal states (seizures in this case) is challenging if we use information from the delta and beta bands. [PERSON] et al. [28], investigating seizures using electrocorticography (ECoG) or intracranial EEG, reported either rhythmic theta-alpha spike activity or rhythmic theta-alpha sinusoidal waves at seizure onset. Our hypothesis in this study is that theta-alpha activity will also provide an indication of seizure onset with scalp EEG. Hence, in this study we have used the activity in the theta-alpha band to compute the PBI measure.  
Primarily due to historical reasons, such as the use of paper for recording EEG waveforms, clinical EEG interpretation generally relies on signals below 30 Hz. The advent of digital displays has brought about an interest in, and a utilization of, higher frequency components of the EEG signal. It has been noted [6; 29; 7] that high-frequency oscillations (HFOs) between 80 and 500 Hz contain spatial and  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{1}{c}{**Original Bands**} & \multicolumn{2}{c}{**Combined Bands**} \\
**Band** & **Frequency (Hz)** & **Band** & **Frequency (Hz)** \\ \hline Delta & 0.5–4 & Delta–Theta & 0.5–8 \\ Theta & 4–8 & Theta–Alpha & 4–14 \\ Alpha & 8–14 & Alpha–Beta & 8–30 \\ Beta & 14–30 & Beta–Gamma & 14–80 \\ Gamma & 30–80 & Gammas & 30–125 \\ High Gamma & 80–125 & All & 0.5–125 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Frequency band ranges.  
Figure 1: Algorithm flowchart. EEG = electroencephalography, FFT = fast Fourier transform, PBI = power in a band of interest.  
temporal information about epileptic seizures. While most studies on HFOs are based on ECoGs it has been suggested that HFOs may also be useful for studying seizures using scalp EEG [7]. Unfortunately, there is significant contamination of the EEG signals with the electromyogram (EMG) between 20 to 300 Hz, and the level of contamination increases with increasing frequency [30]. However, new studies suggest that the use of HFOs with EEGs is also possible by filtering out or lessening the EMG contamination noises on EEG recordings [29]. Because of the existence of EMG coherence across EEG leads [31], it seems reasonable to assume that when we examine the difference between leads, the effect of this contamination will be reduced. In this study, because of the sampling frequency of the datasets used, the high gamma band is considered to be representative of the HFOs. Therefore, for measures of network connectivity which involve the distance between the nodes in the network, we use the spectral coefficients from the high gamma band.