## 3 Methods
### Evaluation of the Effectiveness of Seizure Detection  
The division into a training set and a test set is a crucial element in training and evaluating classifiers [119]. It allows for assessing the effectiveness of the classifier on new, unknown data. To effectively train a classifier, we need a sufficient amount of data. The data should be representative of the classification problem and contain diverse examples from all the classes that the classifier is intended to recognize. Typically, the data are divided into two sets: The training set and the test set. Usually, the majority of the data are allocated to the training set (70-80%), while a smaller portion is allocated to the test set (20-30%) [120]. It is important for the division to be random and maintain the class proportions to prevent introducing biased associations. The training set is used to train the classifier. The classifier analyzes the training examples and adjusts the weights or parameters of its structure to learn to recognize patterns and classify the data. After the training is completed, the classifier is tested on unknown data from the test set. The classifier analyzes these test examples and predicts their classes. The predicted classes are compared with the actual classes to evaluate the effectiveness of the classifier. A confusion matrix (Table 4) is a tool used to evaluate the effectiveness of classification in binary or multiclass problems [121]. It is a table that presents the number of correctly and incorrectly classified examples for each class. The confusion matrix is a useful tool for visualizing and analyzing classification results in the context of epileptic seizure detection, allowing the identification of types of classification errors and the assessment of classifier effectiveness. The evaluation measures of classification quality can be calculated based on the confusion matrix, whose elements are defined as follows:  
* True Negative (_TN_): The number of cases correctly classified as non-seizure periods. * False Positive (_FP_): The number of cases incorrectly classified as epileptic seizures when they are non-seizure periods (Type I error). * False Negative (_FN_): The number of cases incorrectly classified as non-seizure periods when they are epileptic seizures (Type II error). * True Positive (_TP_): The number of cases correctly classified as epileptic seizures. Based on the comparison between predicted and actual classes, various measures of classification quality can be calculated, such as accuracy, sensitivity, specificity, precision, etc. These measures help assess the effectiveness of the classifier and understand how well it performs on new, unknown data [116,120]. A brief explanation of these metrics is as follows:  
* Accuracy is a general measure of classifier effectiveness, determining the ratio of the number of correctly classified cases (both epileptic seizures and non-seizure periods) to the total number of cases. A higher accuracy value indicates that the classifier performs well overall in classification [78,122]. * Precision is a measure of the classifier's ability to correctly identify epileptic seizures among all signals classified as seizures. Numerically, it is the ratio of the number of correctly classified epileptic seizures to the sum of correctly classified epileptic seizures \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Predicted No Seizure** & **Predicted Seizure** \\ \hline Actual No Seizure & True Negative & False Positive \\ Actual Seizure & False Negative & True Positive \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Interpretation of a confusion matrix. and other signals incorrectly classified as seizures. A higher precision indicates that the classifier has a lower tendency for false positive classification errors [123]. \[Precision=TP/(TP+FP)\] (16)
* Sensitivity is a measure of the classifier's ability to correctly detect epileptic seizures. It is numerically defined as the ratio of the number of correctly detected seizures to the total number of seizures in the test data.