# Real-Time Computing Strategies for Automatic Detection of EEG Seizures in ICU
###### Abstract  
Developing interfaces for seizure diagnosis, often challenging to detect visually, is rising. However, their effectiveness is constrained by the need for diverse and extensive databases. This study aimed to create a seizure detection methodology incorporating detailed information from each EEG channel and accounts for frequency band variations linked to the primary brain pathology leading to ICU admission, enhancing our ability to identify epilepsy onset. This study involved 460 video-electroencephalography recordings from 71 patients under monitoring. We applied signal preprocessing and conducted a numerical quantitative analysis in the frequency domain. Various machine learning algorithms were assessed for their efficacy. The k-nearest neighbours (KNN) model was the most effective in our overall sample, achieving an average F1 score of 0.76. For specific subgroups, different models showed superior performance: Decision Tree for 'Epilepsy' (average F1 score of 0.80) and 'Craniencephalic Trauma' (average F1 score of 0.84), Random Forest for 'Cardiorespiratory Arrest' (average F1 score of 0.89) and 'Brain Haemorrhage' (average F1 score of 0.84). In the categorisation of seizure types, Linear Discriminant Analysis was most effective for focal seizures (average F1 score of 0.87), KNN for generalised (average F1 score of 0.84) and convulsive seizures (average F1 score of 0.88), and logistic regression for non-convulsive seizures (average F1 score of 0.83). Our study demonstrates the potential of using classifier models based on quantified EEG data for diagnosing seizures in ICU patients. The performance of these models varies significantly depending on the underlying cause of the seizure, highlighting the importance of tailored approaches. The automation of these diagnostic tools could facilitate early seizure detection. EEG; ICU; machine learning; seizure; signal processing Article  
Real-Time Computing Strategies for Automatic Detection of EEG Seizures in ICU  
1  
State-of-the-art ML techniques for the real-time processing of EEG signals have seen significant improvements. One notable approach is using deep learning architectures for detecting seizures in neonates. This system achieves a 56% relative improvement compared to traditional feature-based methods, reaching an AUC (Area Under the Curve) of 98.5% [8]. Other researchers achieved better results, such as [PERSON] et al. [9], who improved the previous results, obtaining an accuracy of 99.6% using artificial neural networks, or other authors, such as [PERSON] et al. [10], who achieved a detection accuracy of up to 84.3%. However, most published studies used public datasets like Bonn, Freiburg, and CHB-MIT datasets. The five-class Bonn dataset is a set of 500 recordings, of which 100 were from patients with seizures; the Freiburg dataset contains invasive EEG recordings of 21 patients who have medically intractable focal epilepsy; and the CHB-MIT dataset contains a collection of EEG recordings from 32 paediatric patients with refractory epilepsy. Scientific progress has improved the accuracy and performance of EEG analysis and opened up new avenues for research and application in healthcare and neuroscience [7; 8; 11; 12]. Our research focuses on enhancing seizure detection accuracy in diverse patient groups admitted to the Intensive Care Unit (ICU). This study encompasses a range of patient cohorts, including those with brain haemorrhage, cranioencephalic trauma (CET), cardiorespiratory arrest (CRA), central nervous system infections, exacerbated known epilepsy, and brain ischemia. We have stratified these patient groups based on the aetiology of their brain injury and the nature of their seizures, whether they are convulsive or non-convulsive, focal or generalised. We have employed a multifaceted approach in processing raw electroencephalogram (EEG) signals to optimise seizure detection accuracy.