## 1 Introduction  
Epilepsy is one of the most common neurological disorders, affecting millions of people worldwide. This condition is characterized by recurrent epileptic seizures, which can have different symptoms and severity and can impact the quality of life of the patient and their surroundings [1]. Many patients experience difficulties in daily activities such as driving, professional work, or education. Epilepsy also leads to social isolation, which can affect the patient's well-being and mental health [2]. The issue of epilepsy is also significant from a social and economic standpoint [3]. The costs of epilepsy treatment are high, and this condition can result in work disability, impacting productivity and social development. The treatment of epilepsy is a complex process that depends on various factors, such as the type and severity of epilepsy, the patient's age, the presence of other medical conditions, and the response to medications [4]. Unfortunately, despite advancements in medicine, some patients experience difficulties in controlling epileptic seizures. One reason for this may be the insufficient effectiveness of antiepileptic drugs in certain patients [5]. While many antiepileptic drugs are available, finding the proper medication or dosage for a particular patient is not always possible. Furthermore, some medications may cause side effects that make adherence to therapy challenging. Drug resistance occurs in approximately 30% of patients with epilepsy and is associated with various factors, including the type of epilepsy, duration of the disease, number and frequency of seizures, and the presence of other medical conditions [6]. Electroencephalographic (EEG) and intracranial electroencephalographic (iEEG) signals are used in the diagnosis of epilepsy, as well as in the prediction and detection of epileptic seizures [7; 8]. EEG is a non-invasive method of measuring the brain's electrical activity, while iEEG is a more invasive method that involves placing electrodes inside the skull. In both cases, recording the brain's electrical activity enables the analysis of neuronal changes and the determination of when epileptic seizures occur. With iEEG, due to the more precise recording of neuronal activity, it is possible to achieve a more accurate localization of the brain region where epileptic seizures occur [9; 10]. Algorithms have been developed using EEG and iEEG signals for the detection and prediction of epileptic seizures [11]. These algorithms utilize various signal analysis methods, such as frequency analysis and time-frequency analysis, and artificial intelligence techniques, including neural networks and machine learning algorithms [12; 13; 14; 15; 16]. In practice, these algorithms can be employed in implanted medical devices, such as neurostimulators, which utilize iEEG for seizure detection and deliver electrical impulses to suppress seizures [17]. Another application involves the use of EEG signals in portable devices, such as watches or bands, which enable continuous EEG signal recording and alert the patient to an upcoming seizure [18]. Thus, the utilization of EEG and iEEG signals for seizure detection and prediction has the potential to significantly improve the quality of life for epilepsy patients and reduce the costs associated with treatment and healthcare. EEG signals recorded during epileptic seizures vary for each individual due to their unique anatomical and physiological brain characteristics, as well as the type and location of the epilepsy [19; 20]. During an epileptic seizure, there are rapid changes in the activity of brain neurons, leading to characteristic alterations in the EEG signal. However, different individuals may have different brain regions involved in the seizure, resulting in variations in the EEG signal. Nevertheless, it is important to note that there are certain similarities in the EEG signal during epileptic seizures that allow for the general identification of characteristic patterns [21].