## 4 Proposed Epileptic Seizures Detection Model
### Data Collection--EEG Dataset
Preprocessing steps, including Binarization and the application of SMOTE, were applied to enhance data quality and rectify imbalances within the dataset, ensuring robustness in the models developed. This step was critical in ensuring that the classifier did not develop a bias toward the majority classes. Figure 3: A sample of the Epileptic Seizure Recognition Dataset [1]. SMOTE was used to synthetically generate new instances only for the training set after the data had been split by subject to preserve patient independence and prevent data leakage into the test set. This approach ensured that no artificially generated samples influenced the model's evaluation on unseen data. The EEG waveforms illustrated in Figure 4 are not specific to a single electrode or channel. Instead, they represent the average signal of all EEG data points across all samples within each class, computed using the average of the EEG vectors (X1 to X178) along the time axis. This approach highlights general waveform patterns typical of each class (e.g., ical vs. healthy). The aim is to visually contrast the distinct temporal characteristics of the five EEG signal classes. These signals were originally captured using a single electrode, likely from the Fpz-Cz or Pz-Oz positions, although the exact montage is not specified in the dataset documentation. Therefore, multichannel data is not available in this version of the dataset; rather, each file contains one-dimensional EEG signals representing one channel. The five classes represent distinct brain states:  
1. Class 1 (ictal)--EEG signals recorded during active epileptic seizures;
2. Class 2 (pre-ictal)--EEG signals recorded shortly before the onset of a seizure;
3. Class 3 (inter-ictal)--EEG signals between seizures (non-seizure periods);
4. Class 4 (healthy with eyes closed)--Baseline EEG from healthy individuals;
5. Class 5 (healthy with eyes open)--Baseline EEG from healthy individuals under normal alert conditions. No behavioural tasks were conducted during EEG acquisition for the healthy participants. The healthy datasets were collected under resting-state conditions with eyes either open or closed. For seizure-related recordings, the original dataset documentation does not specify whether participants were under medication, the exact seizure type, or the environment during recording. As such, while this dataset supports classification tasks effectively, it has limitations in clinical metadata and channel diversity. Each class represents distinct EEG signal patterns associated with specific physiological states or seizure types, as shown in Table 2. By visualizing these waveforms, we can observe the characteristic electrographic features of epileptic seizures and differentiate them from  
Figure 4: Average EEG waveforms for each signal class in the dataset: ictal, pre-ictal, inter-ictal, healthy (closed eyes), and healthy (open eyes). The plotted signals are the average of 178-sample EEG vectors across all instances in each class, providing a visual comparison of their distinct temporal features. normal EEG patterns. This comparison aids in identifying unique signatures of epileptic activity, facilitating accurate seizure detection and classification. The minority classes in the dataset were identified based on their original class distribution. Specifically, after segmentation and before balancing, the five classes--ictal, pre-ictal, inter-ictal, healthy (eyes closed), and healthy (eyes open)--were observed to have equal counts in the raw dataset. However, due to stratified subject-level train-test splitting, imbalances emerged in the training subset, particularly affecting seizure-related classes. SMOTE was therefore selectively applied to these underrepresented classes. This targeted application of SMOTE improved the model's sensitivity to minority seizure classes while maintaining data integrity and reproducibility. The use of SMOTE only on the training set ensures that evaluation metrics reflect the model's true generalizability to real-world, imbalanced data scenarios.