Preprint
Article

This version is not peer-reviewed.

Epilepsy Detected Using a New Method Based on Volumetric Analysis Results from Brain MR Images

Submitted:

05 June 2026

Posted:

05 June 2026

You are already at the latest version

Abstract
Epilepsy is a challenging brain disease that requires significant clinical findings. (1) Background: The aim of this study is to improve the success rate of epilepsy detection using a newly developed method by optimizing the high-dimensional dataset obtained from brain MRI images. Standard machine learning models fall short of achieving the desired success in high-dimensional datasets. To achieve this, we aimed to develop an optimized hybrid model by combining the local classification power of the k-Nearest Neighbor classifier and the anomaly detection success of the Negative Selection Algorithm. (2) Methods: Cortical and subcortical brain regions were analyzed to examine volumetric differences. A dataset was created by identifying regions statistically significant for epilepsy. This dataset was then optimized using the Scatter Search Snake Optimization algorithm. The performances of six different machine learning models trained on this optimized dataset were compared. (3) Results: The standard and popular models, SVM (78.70%), kNN (77.30%), RF (77.30%), MLP (74.30%), and NSA (93.33%), demonstrated a success rate. In contrast, the proposed hybrid model, kNN-NSA (98.67%), demonstrated a detection success rate. (4) Conclusions: The optimized hybrid kNN-NSA approach, which considers local density in such high-dimensional datasets and tolerates outliers within the self-data, appears to outperform traditional methods. Furthermore, this study has demonstrated that volumetric differences in regions not previously reported in the literature, such as WM-hypointensities, ventral DC, and choroid plexus, may be effective in the decision-making process for diagnosing epilepsy, as they are also found to be significant.
Keywords: 
;  ;  ;  ;  

1. Introduction

Brain volume and surface area are important in the diagnosis of many diseases in both children and adults. Studies on many diseases, such as autism, ADHD, schizophrenia, multiple sclerosis, epilepsy, and Alzheimer's disease, highlight changes in brain volume. Volume and surface area are used as important data in the study of brain function [1]. Epilepsy is a disease that affects men and women of all races, in every region of the world, and at a rate of approximately one in 100 people. In approximately half of patients, no specific cause can be found. Epilepsy is a temporary, abnormal electrical impulse in brain cells caused by short-term brain dysfunction [2]. In addition to clinical information, the most important diagnostic tools for diagnosing epilepsy are EEG and neuroimaging. The diagnosis of epilepsy is often difficult to make, and misdiagnoses can occur. EEG is a helpful diagnostic test for diagnosing epilepsy and classifying the underlying epileptic syndrome. However, EEG alone is not sufficient to establish or rule out the diagnosis of epilepsy. Therefore, magnetic resonance imaging is also used [3]. It can be used to identify structural abnormalities that may be the cause of some epilepsy. Magnetic resonance imaging (MRI) is the imaging study of choice for individuals with epilepsy. Structural and functional assessment of the brain through imaging studies is essential for the diagnosis and management of epilepsy. Images should be reviewed by a specialist experienced in the evaluation of patients with epilepsy [4]. In recent years, studies using advanced radiological methods such as magnetic resonance volumetry (MRV) and voxel-based morphometry (VBM) have reported that epilepsy is not limited to the hippocampus; volumetric changes can also be observed in other areas structurally and functionally connected to the hippocampus. Although various studies have examined the factors that may cause changes in brain volume in epilepsy, studies that evaluate brain areas as a whole using the MRV technique neuroradiologically and correlate them with volumetric changes are relatively few [5]. The introduction should briefly place the study in a broad context and highlight why it is important. It should define the purpose of the work and its significance. The current state of the research field should be carefully reviewed and key publications cited. Please highlight controversial and diverging hypotheses when necessary. Finally, briefly mention the main aim of the work and highlight the principal conclusions. As far as possible, please keep the introduction comprehensible to scientists outside your particular field of research. References should be numbered in order of appearance and indicated by a numeral or numerals in square brackets—e.g., [1] or [2,3], or [4,5,6]. See the end of the document for further details on references. Morphometric brain analyses were conducted to examine structural changes in the brains of individuals with epilepsy. These analyses attempted to identify differences by comparing volumetric values of different brain regions with those of healthy individuals. In a literature review in this area, Cablan et al. [6] conducted a study demonstrating decreased volumetric values in frontal and temporal lobe volumetric analyses. Kemmotsu et al. [7] examined the effects of cortical thinning and white matter abnormalities on temporal lobe epilepsy. Rebecca et al. [8] reported decreased hippocampal and cerebellar volumes in their article. William et al. [9] reported decreased cerebral volume. Keller et al. [10] reported decreased thalamus volume. Salmenpera et al. [11] found decreased hippocampus, amygdala, entorhinal cortex, and perirhinal cortex volumes in their study. Kalviainen et al. [12] reported decreased amygdala volume. Bingwei et al. [13] emphasized that hippocampus and amygdala volumes were low in their study. Park et al. [14] reported decreased cerebellar white matter volume in their study. Hutchinson et al. [15] reported a decrease in the anterior corpus callosum, an increase in the posterior corpus callosum, and an increase in the total volume of the corpus callosum. They also emphasized a decrease in gray matter and white matter in the temporal lobe. Cao et al. [16] reported an increase in gray matter in the frontal lobe and a decrease in the thalamus. Andrew and Hal [17] emphasized the importance of the thalamus, brainstem, hypothalamus, and cerebellum regions. Zelco et al. [18] examined a decrease in cortical gray matter, an increase in cortical white matter, and a decrease in subcortical gray matter and the hippocampus. Bernasconi et al. [19] conducted a study indicating a decrease in the amount of gray matter and white matter. Keller et al. [20] conducted a study indicating a decrease in the amount of gray matter. Bonilha et al. [21] reported a decrease in the volume of the thalamus. Kim et al. [22] examined a decrease in the amount of GM. Pulsipher et al. [23] examined the decrease in volume values of the hippocampus, thalamus, caudate, putamen, and corpus callosum. Elts et al. [24] reported a decrease in volumes of the total brain, hippocampus, and amygdala. O’Downer et al. [25] also examined the decrease in corpus callosum volume in their study. Peng et al. [26] reported that the volumes of subcortical gray matter, hippocampus, caudate, putamen, palladium, thalamus, and amygdala decreased, with only the right palladium increasing. Keihaninejad et al. [27] reported a decrease in intracranial volume in their study. Briellmann et al. [28] also reported a decrease in intracranial volume.
Anomaly detection is the process of identifying outliers, or rare events, within data that deviate significantly from “normal” patterns. It plays a critical role in cybersecurity (intrusion detection), industry (fault detection), medicine (disease detection), and finance (fraud detection) [29]. One of the most common forms of this problem is conceptualized as the distinction between “self” (normal) and “non-self” (abnormal), inspired by Artificial Immune Systems (AIS) [30]. However, a fundamental challenge that complicates anomaly detection is the phenomenon known as the “curse of dimensionality” [31]. As the number of features in a dataset increases, similarity measures such as the Euclidean distance between data points begin to lose their meaning, and the data space becomes increasingly sparse. This can cause self and non-self-points to become intertwined in space, or the “normal” region to become undefined.
Artificial Immune Systems (AIS) are computational intelligence models inspired by the biological immune system. The Negative Selection Algorithm (NSA) is a central component of AIS. NSA is based on the principle of generating a set of detectors that first define the "Self" and detect anything that does not match this defined set as a "non-self" or anomaly. This adaptive learning mechanism is quite powerful for anomaly detection, especially when the self-set can be clearly defined [32].
Improving the detection success of a Negative Selection Algorithm (NSA) is a multifaceted process that requires addressing the algorithm's inherent weaknesses and optimizing the quality of the detector set. Research indicates that hybrid architecture and metaheuristic optimization techniques offer the most effective solutions for this purpose. Especially on high-dimensional datasets, NSA, a distance-based algorithm, suffers from the "Curse of Dimensionality", a condition in which distances between data points become meaningless and performance suffers. One of the biggest constraints on NSA performance is the "holes" that arise when the detector set doesn't perfectly cover the core space. These holes cause non-self (anomaly) samples to be incorrectly classified as self, decreasing the detection rate (DR). Feature Selection: A critical preprocessing step to improve NSA detection success is selecting the optimal feature subset. This reduces the influence of irrelevant or noisy features.
On the other hand, the k-Nearest Neighbor (kNN) algorithm functions as a local classification and anomaly scoring method based on data density [33]. The anomaly score of a test sample is related to its distance to its nearest neighbors or the density of these neighbors.
Building a hybrid kNN-NSA model aims to combine the strengths of the two models. NSA creates a global exclusion region around the Self cluster, while kNN is sensitive to local data distribution. This hybrid approach can improve classification accuracy by combining the overall coverage efficiency of NSA with the ability of kNN to detect local anomaly deviations. This integration is important because ensemble models provide consistent performance improvement over traditional models such as Random Forest or Support Vector Machines.
In this study, a dataset was created by volumetrically analyzing brain MRI images of healthy individuals and those diagnosed with epilepsy, selecting statistically significant regions. Using this dataset, we measured the success of the optimized hybrid kNN-NSA algorithm in detecting epilepsy. With the dataset on which quality optimization was performed with the SSSO algorithm, the model achieved 98.67% detection success and 98.45% accuracy success with the hybrid kNN-NSA algorithm.
In summary, to increase the detection success of NSA, the most suitable model for epilepsy detection was determined by applying the most effective strategy that eliminates the noise and dimensionality problem by selecting features with SSSO [34], which is a meta-heuristic optimization, and determines the detector formation at the most appropriate level by creating a hybrid structure with kNN.

1.1. Related Work

This study examines the diagnostic performance of machine learning algorithms by reviewing studies in epilepsy. A brief overview of commonly used machine learning approaches and the need for further application of machine learning techniques in epilepsy are presented. With increasing computational capabilities, the availability of effective machine learning algorithms, and the accumulation of larger datasets, clinicians and researchers will increasingly benefit from familiarity with these techniques and the significant progress already being made in their application in epilepsy.
Machine learning utilizes statistical and computer science principles to develop algorithms that can improve performance by interpreting data rather than explicit instructions. In addition to widespread use in image recognition, language processing, and data mining, machine learning techniques have gained increasing interest in medical applications, from automated imaging analysis to disease prediction. Classification studies have also been conducted to identify patients with epilepsy using values obtained from morphometric brain analyses. A literature search revealed that very few studies have been conducted in this area. Cantor-Rivera et al. [35] achieved an 88.9% success rate in identifying epilepsy patients using SVM. Rudie et al. [36] achieved an 81% success rate using the SVM classification tool in their study. Kodipaka et al. [37] found 80.65% success with SVM in their study based on volume values. Keihaninejad et al. [27] achieved 89% classification success with SVM in their study. Torres-Velázquez et al. [38] classified epilepsy disease with 71.43% success with multi-channel deep neural network method in their study. Chen et al. [39] achieved 93.3% classification success in mesial temporal lobe epilepsy with SVM algorithm. John Del Gaizo et al. [40] achieved 82.0% success using the SVM algorithm on diffusion MRI data. Svyatoslav Vergun et al. [41] achieved 90% success in their classification study using the naive Bayes algorithm. Zhou et al. [42] achieved 84% success with the SVM algorithm in their study titled "Machine learning for detecting mesial temporal lobe epilepsy by structural and functional neuroimaging." Ghazal Sahebzamani et al. [43] achieved 94% success with the SVM algorithm in their study titled Machine Learning Based Analysis of Structural MRI for Epilepsy Diagnosis.
Most studies on epilepsy detection use EEG signal data. However, studies using MRI image data are quite limited. We aim to contribute to the literature with this study.

1.2. Contribution of the Study to the Literature

The main contribution of this work is to combine the powerful local classification capability of kNN with the robust anomaly detection mechanism of NSA in an optimized framework. The success of the model, especially in challenging domains such as the analysis of high-dimensional biomedical data, depends on the integration of its three underlying layers. The proposed hybrid architecture for this purpose is as follows:
1. Meta-Heuristic Feature Selection: To address the high-dimensionality problem, Scatter Search Snake Optimization (SSSO) is used to identify the most discriminative feature subset.
2. NSA-Based kNN Optimization: Using the k Nearest Neighbor Algorithm (kNN), the NSA optimizes the radius of the detectors, maximizing specificity and reducing FPR/time to clinically acceptable levels.
3. Patient-Normal Discriminatory Power: This provides a system capable of performing the challenging patient-normal discrimination of a dataset obtained from MR images with high reliability.

2. Materials and Methods

The process steps of the model developed in this section are discussed as shown in Figure 1.

2.1. Data Acquisition

In this study, MRI images of 121 healthy individuals and 75 individuals diagnosed with epilepsy were obtained from the MRI Service of Aksaray University Aksaray Training and Research Hospital, in accordance with the Ethics Committee Report. The images are in DICOM format and were obtained retrospectively from the neurology clinic archives. In the preprocessing phase, T1-weighted images were used by examining DICOM images taken in sagittal, coronal, and axial positions in T1, T2, and Flair sequences. MRI protocol: MRI morphometric examination was performed using a 1.5T Magnet (Philips Intera, Netherlands) device and a standard head coil. A 3D FFE (fast field echo) sequence was obtained using the interhemispheric line for area measurement in the T1-weighted coronal plane, and the following technical factors were applied: TR (repetition time) = 25 msec, TE (echo delay time) = 5 msec, FOV (field of view) = 130x160, matrix = 224x224, flip angle = 30 degrees, and slice thickness = 0.7 mm for volume, with a gap = 0.

2.2. Preprocess

The preprocessing phase involved reviewing CDs of MRI images from individuals obtained from the Neurology archives and preparing them for the FreeSurfer program. For this purpose, DICOM images taken in sagittal, coronal, and axial positions using T1, T2, and Flair sequences were analyzed in the viewer program. Appropriate and clean T1-weighted images were selected.

2.3. Feature Extraction

The T1-weighted images selected because of preprocessing were analyzed using the FreeSurfer [44] program, which is installed on the Linux-based (Ubuntu) operating system. The tissue and brain regions were separated from the selected MR images according to the procedures described by Fischl et al. [45], and the tissue portion was extracted. Cortical and subcortical regions were extracted along with their volumetric values because of the analysis performed with the FreeSurfer program. This process automatically segments gray matter, white matter, and subcortical thicknesses, providing reliable volumetric values. The feature extraction process is performed by performing the steps shown in Figure 2.
As a result of the analysis conducted with FreeSurfer, regions with volume values were identified as attributes of the dataset prepared for this study. These regions are listed in Table 1.

2.4. Feature Selection

When performing classification studies on large datasets, one of the most crucial steps is feature selection. The presence of many features in a dataset increases the training and testing time of machine learning algorithms. Furthermore, some machine learning algorithms are sensitive to redundant features, which can lead to performance degradation. Therefore, feature selection is a frequently used operation in classifier systems. Feature selection is generally performed in two ways: Filtering and Wrapping Methods [46]. In filtering methods, features are ranked according to a selected criterion, and those with the highest ranking are selected. In wrapper methods, the classifier is used as a black box. The classifier performance values of the selected feature sets are checked, and feature sets with high success rates are selected [47]. In this article, statistical tests are used as the wrapper feature selection method. The relevant tests were performed in SPSS.
The method and test used to analyze data statistically is important because it creates assumptions and hypothesis that will help examine the effects of independent variables on dependent variables. To do this, the data is checked for parametricality before being analyzed. If the group variances are equal and the data have a normal distribution, it is parametric. Otherwise, it is non-parametric. The t-test is used in the parametric method, and the Mann-Whitney U test is used in the non-parametric method. The Mann-Whitney U, a nonparametric hypothesis test, is used to investigate whether there is a significant difference in median between two sample groups [48].
In this study, nonparametric hypothesis testing was used because the data were not normally distributed with kurtosis and skewness values between -1 and +1, and group variances were not equal. The Mann-Whitney U test, a nonparametric test, was used. The Mann-Whitney U test is a nonparametric test that is an alternative to the independent samples t-test. This test is used to examine the mean difference between two independent groups from similar populations and to determine whether there is a difference or equality between the groups. The classification or detection performance of the attributes (regions) found to be significant because of this test was measured. Using this test, the significance of the regions between the patient and control groups was examined (at a 95% confidence level).

2.5. Feature subset selection (Feature reduction)

Feature subset selection is the selection of a smaller subset of features from a larger set of features. This avoids complex computations and makes classifiers work much faster [49]. Sometimes, we try to reduce the size of the feature subset, while other times we try to increase the prediction accuracy. Essentially, feature subset selection aims to create a subset that most accurately represents the dataset by eliminating unnecessary features. In other words, it aims to obtain the minimum number of features while increasing classification accuracy [50].
In this study, to improve the performance of the model, the subset selection of the attributes obtained from the MWU statistical test was performed using the SSSO algorithm developed by Bölükbaş et al. [34]. The flow chart of the SSSO algorithm is given in Figure 3.

2.6. Machine Learning Algorithms

To test the success of epilepsy detection, machine learning algorithms such as Support Vector Machines (SVM), k-Nearest Neighbor (kNN), Random Forest (RF), Multilayer Perceptron (MLP), Negative Selection Algorithm (NSA) and Hybrid kNN-NSA algorithm were used.

2.6.1. k-Nearest Neighborhood (kNN) Algorithm

The k-Nearest Neighbor method is one of the supervised learning methods used in classification problems. In this method, the similarity of the data to be classified to the normal behavior data in the learning set is calculated, and then the data are assigned to classes based on the average of the k closest data points and a specified threshold value. The key is that the properties of each class are clearly defined in advance. The method's performance is influenced by the number of nearest neighbors k, the threshold value, the similarity measure, and the sufficient number of normal behaviors in the training set. For more information on k-NN, see Zhao et al. [51].

2.6.2. Support Vector Machine (SVM) Algorithm

Support Vector Machines have been successfully applied to numerous classification problems and have earned their place in literature as one of the most effective machine learning algorithms with high generalization performance. The most significant advantage of Support Vector Machines is that they transform the classification problem into a quadratic optimization problem and solve it. This reduces the number of operations involved in the learning phase and enables faster solutions compared to other techniques/algorithms. Kernel function selection and parameter optimization play a crucial role in the application of Support Vector Machines to solving classification problems for various datasets. The performance of kernel functions can vary depending on the dataset and the problem. For more information on SVM, see Gargia et al. [52].

2.6.3. Multi-Layer Perceptron (MLP) Algorithm

Multi-Layer perceptron neural networks consist of an input layer containing input neurons, an output layer containing output neurons, and one or more hidden layers. Because additional layers are added between the input layer and the output layer to address nonlinear problems, the network architecture is multilayered. Determining the number of hidden layers in neural network architecture is crucial. Unlike creating input and output layers, network architecture begins without prior knowledge of the number of hidden layers. Typically, when creating network architectures, the appropriate number of hidden layers is determined through trial and error. For more information on MLP, see Güler et al. [53].

2.6.4. Random Forest (FR) Algorithm

It is an algorithm that increases the classification rate by generating multiple decision trees during the classification process. The Random Forest method consists of a collection of Classification Trees or Regression Trees, depending on the desired number of trees. Randomly selected decision trees are combined to form a decision forest. It performs well on datasets containing categorical variables with many variables and class labels, missing data, or unbalanced distributions. Therefore, Random Forest is one of the most widely used ensemble methods. The basic idea behind the method is to generate ensembles using a randomly selected subset of predictor trees from many trees. For more information, see the work of Breiman [54].

2.7. Developed Machine Learning Model

2.7.1. Negative Selection Algorithm (NSA)

Foreign cells in the innate immune system are recognized by two lymphocytes, B and T cells, produced in the bone marrow. Both cells are produced in the bone marrow. The T cells then undergo a process called negative selection in the thymus. During this stage, T cells that do not match the body's own cells are released from the bone marrow.
The remaining cells are destroyed here. This way, all surviving T cells will recognize non-self-cells. This elimination of T cells protects the immune system from attacks by the body's own proteins. By exploiting this property of the innate immune system, an anomaly detection algorithm based on negative selection of T cells has been developed. This algorithm, called negative selection, has been used for computer security. The most important feature of this algorithm is that it stores information about the unknown pattern set for the system using the available eigen sets and can be used for pattern recognition. The detector generation and error detection flowchart of the negative selection algorithm is shown in Figure 4.
As shown in Figure 4, the set of patterns to be preserved is first determined and called the ‘self-set.’ Based on the negative selection algorithm, a set of detectors responsible for identifying elements that do not belong to the ‘self-set’ set is created. The negative selection algorithm eliminates detectors by comparing them with the training set of randomly generated detectors. This comparison is performed using similarity functions known as affinity. The affinity function, based on the Euclidian distance measure, is shown in (1) and (2). Equation (1) (2) shows the comparison calculation of the i. element for the n-length training dataset (core dataset) and the randomly generated detector set.
D i s D , E = i = 1 n ( D i E i ) 2
A = D i s D i , E n ϵ
Here, the affinity value A is determined by the values of ɛ (threshold value) and dis (distance). If the value of A is less than zero, the randomly generated detector is eliminated. Otherwise, the detector is added to the real detector set. Preprints 217118 i001
The comparison between the anomalous and normal cases is similar. After creating the detector set, the next step of the algorithm consists of monitoring the system for the presence of nonself patterns. In this case, a test set is created. This set consists of the self-set and the nonself set, or an entirely new nonself set. For all elements of the sensor set corresponding to nonself models, a match is checked to see if it recognizes an element of the test set. If there is a match, then a nonself model has been recognized, and the reaction should begin. In nonself detection, the result action evaluation varies depending on the problem and is outside the pattern recognition scope of the negative selection algorithm. To construct the NSA's detector set, the algorithm steps developed by Forrest and Perelson [30] were followed. Below are the process steps showing the detector training phase of the negative selection algorithm [55].

2.7.2. Developed hybrid kNN-NSA model for epilepsy detection (Hybrid kNN-NSA)

The model referred to as hybrid kNN-NSA is an anomaly detection approach that combines the Negative Selection Algorithm (NSA) from the field of Artificial Immune Systems with the optimized k-Nearest Neighbor (kNN) algorithm.
Anomaly detection is the process of identifying outliers or rare events within data that deviate significantly from "normal" patterns. It plays a critical role in cybersecurity (intrusion detection), industry (fault detection), and finance (fraud detection) [56]. One of the most common forms of this problem has been conceptualized as the distinction between “self” (normal) and “non-self” (abnormal), inspired by Artificial Immune Systems (AIS) [57].
However, the size of the problem or the number of features in the dataset make anomaly detection difficult [59]. As the number of features (dimensions) in the dataset increases, similarity measures such as the Euclidean distance between data points begin to lose their meaning, and the data space becomes increasingly sparse. This causes self and non-self-points to become intertwined in space, or a clear boundary of the normal region cannot be drawn.
In this study, disease detection was performed by reducing a high-dimensional dataset to 13 dimensions (features) using the SSSO algorithm. It is known that standard machine learning models often fail on such high-dimensional datasets. The aim of this hybrid model is to improve the success of epilepsy detection by combining the logic of the Negative Selection Algorithm (NSA) with the Positive Selection philosophy and the selection approach of the k-Nearest Neighbor (kNN) algorithm. It also proposes a hybrid approach that models the inside of the "normal" region (Positive Selection), as opposed to the Negative Selection (NSA) algorithm's philosophy of modeling the outside of the "normal" region, but utilizes the local density estimation capabilities of kNN.
In high-dimensional data sets, it can be said that the performance of the model depends on optimizing the algorithm with the correct hyperparameters according to the structure of the data rather than the selected algorithm.
This model is to detect "Epilepsy" (Non-Self) data that is not like the data set defined as "Normal" (Self). The logical flow and process steps of this hybrid model are as follows:
This flow represents a hybrid architecture that aims to solve the "hole" problem of NSA by combining the fast anomaly detection capability of NSA (detector matching) with the density-based boundary detection capability of kNN (distance measurement). Preprints 217118 i002Preprints 217118 i003

3. Results

This chapter includes an introduction to the experimental setup, problem examples, and a report on the experimental results.

3.1. Experimental Setup

All operations were performed on a machine with a 2.8 GHz CPU, 20 GB RAM, and Windows 11 and Ubuntu operating systems. Feature extraction was performed with FreeSurfer, and statistical analyses were performed with SPSS [58]. Machine learning algorithms were implemented using Matlab and Python programming languages.

3.2. Performance Measures

Since our dataset includes epilepsy patients and healthy controls, we apply binary classification. The metrics listed in Table 1 are Precision (PRE) to measure the accuracy of the detections, Recall (Rcall) to detect anomalies, F1 score to avoid incorrect model selection in unevenly distributed datasets, and Accuracy (Acc) to measure the model's success. They are used to evaluate the performance of classifiers. This section may be divided by subheadings. It should provide a concise and precise description of the experimental results, their interpretation, as well as the experimental conclusions that can be drawn.

3.3. Results of the Feature Extraction Method

In this study, we used the EpilepsyMRI dataset, which we created to identify patients with epilepsy. The MRI images used in this dataset were obtained in retrospective DICOM format from the Aksaray University Aksaray Training and Research Hospital MRI Neurology Archive. These images, belonging to 75 epilepsy patients and 121 healthy individuals, were subjected to structural morphological brain analysis using the FreeSurfer [44] program. This analysis yielded the volume values for the 50 brain regions shown in Table 2. In this study, these extracted regions were used as the raw features of the dataset. These numerical values were used to create a raw dataset. This dataset was used in the training and testing phases to determine the model's performance.

3.4. Results of the Feature Selection Method

The 50 regions shown in Table 2 were subjected to the Independent Samples Mann-Whitney U Test, a statistical test for significance in terms of epilepsy. Because the test revealed a significant volumetric shift in the cortical and subcortical brain regions of epilepsy patients, the volumetric differences in these regions are important for the diagnosis of epilepsy. The Mann-Whitney U Test findings are shown in Table 3. As a result of the analysis, 50 regions were found to be significant at the p<0.05 level for identifying epilepsy. These regions are marked in red in Table 3. These 35 regions selected by the Mann-Whitney U Test will be considered features of the data set to be used in disease detection. These regions are the ones that will distinguish between people with epilepsy and those without. In our dataset, these regions will represent the features. This created data set was named MWU-35.

3.5. Results of the Feature Subset Selection (Feature Reduction) Method

The feature subset selection performance of the SSSO algorithm developed by Bölükbaş et al. [34] is given in Table 4. As can be seen in this table, the performance of SSSO is better compared to other optimization algorithms.
The highest accuracy value was obtained using the PRO method (87.31%), while the proposed SSSO method achieved a performance quite close to that of PRO (87.12%). In terms of error rate, the PRO method achieved the lowest error rate (12.69%), while the SSSO method produced a competitive result with an error rate of 12.88%. In terms of precision, the PFA method achieved the highest value at 95.67%, while the SSSO method achieved a precision value of 95.51%, which is quite close to the performance of PFA. In terms of accuracy metrics, the MRFO method yielded the best result (86.01%), while the SSSO method produced a successful accuracy value of 85.73%. Considering the F1 score as a balanced combination of sensitivity and specificity, the PRO method provided the highest performance (90.41%), while the SSSO method achieved a result (90.36%) quite close to that of PRO. However, in terms of specificity, the SSSO method showed a relatively weak performance compared to other methods, with a value of 73.75%. This may indicate that the method has some limitations in distinguishing negative examples. Overall, the SSSO method demonstrates strong performance, particularly in terms of accuracy, precision, and F1 score, proving to be an effective solution to feature selection problems [34].
Regions identified as significant for epilepsy using the Mann Whitney U statistical method were selected as features of the dataset. Feature subset selection was performed on this dataset using the SSSO algorithm to improve model performance. The results are shown in Table 5.
By optimizing feature selection using the SSSO algorithm in the dataset, 35 features were reduced to 13. The dataset created with the SSSO algorithm is named SSSO-13. The model's performance because of this feature reduction is given in Table 6.

3.6. Parameters Used in Machine Learning Algorithms

After pre-processing techniques, our data was trained using 10-fold cross-validation. Parameters in support vector machines (SVM), k-nearest neighbors (kNN), random forests (RF), multilayer neural networks (MLP), and negative selection algorithms (NSA) are shown in Table 6.

3.7. Evaluation of the Data Set With Selected Qualities Using Machine Learning Methods

In this study, the results obtained according to the machine learning performance criteria given in Table 1 are given in Table 7.

4. Discussion

The dataset created for this study to detect epilepsy demonstrated good performance in machine learning algorithms. Table 8 shows studies classifying epilepsy. As can be seen in the table, the best classification study was performed by Sahebzamani et al. [43]. However, because our goal was to detect epilepsy, our study yielded quite good results.
Table 7 shows the performance values of machine learning algorithms such as SVM, kNN, RF, MLP, NSA, and hybrid kNN-NSA on the MWU-35 and SSSO-13 datasets. An examination of the table reveals that the NSA algorithm performed best on the MWU35 dataset obtained using the Mann Whitney U test. The NSA algorithm achieved a disease classification success rate of 94.30%. Its disease detection success rate was 85.33%. This shows that the NSA algorithm performs best with the MWU-35 dataset. However, since our goal is to improve model performance, we aim to achieve this by both reducing the number of attributes in the dataset and developing a hybrid machine learning method. To achieve this, we applied the SSSO algorithm to the MWU-35 dataset, reducing the number of features to 13. This created the SSSO13 dataset. When we examine the performance of the models on this dataset, we see an increase. The NSA algorithm also achieved a classification success rate of 97.45%. Detection success was measured at 93.33%. As can be seen here, the NSA algorithm significantly improved both the classification and detection success of the model. However, since our goal is to further improve the detection success of epilepsy, we are using the hybrid kNN-NSA algorithm we developed. With the hybrid optimized kNN-NSA algorithm, the detection success rate increased from 93.33% to 98.67%. When we compare these results with the results shown in Table 8, we can see that the 94% classification success rate achieved by Sahebzamani et al. [43] is high. This result demonstrates that the dataset generated with the selected features (regions) can be successful in detecting and classifying epilepsy. It also demonstrates the detection success of the optimized hybrid kNN-NSA for this problem.
To better understand the results obtained, they are graphically visualized in Figure 5 and Figure 6. As can be seen in the graph, the developed hybrid method offers good success in detecting epilepsy.

5. Conclusions

Diagnosing epilepsy requires observing the seizure, reporting these observations to the doctor, and conducting EEG, MRI, and any blood tests deemed necessary by the neurologist. EEG alone is not sufficient to establish or rule out the diagnosis of epilepsy. MRI can help identify the structural abnormality causing epilepsy, facilitate pre-surgical evaluation of drug-resistant epilepsy cases, and provide detailed visualization of anatomical structures. The sensitivity of MRI in detecting abnormalities depends on the pathological characteristics of the lesion, the MRI techniques used, and the experience of the interpreter. In human-based analysis of MRI images, computational methods are needed to reduce interobserver inconsistencies, the manpower required, and the analysis time. The rapid increase in patient numbers and the lack of sufficient manpower for image analysis is further increasing the need for such systems. For these reasons, the interest and need for image processing techniques in medical image analysis is increasing. Despite this long process, epilepsy is often difficult to diagnose and can sometimes be misdiagnosed.
Brain volume and surface area are important for many diseases, including autism, hyperactivity disorder, schizophrenia, multiple sclerosis, epilepsy, pre-term birth, fragile X syndrome, Tourette syndrome, and, in older adults, Alzheimer's disease. Currently, stereological and morphological methods are used to estimate volume and surface area. Morphology is the branch of science that allows interpretations of three-dimensional specimens' true three-dimensional properties from two-dimensional cross-sections. Using this technique, volume and surface area estimations can be made robustly and reliably on MRI images. There are limited resources available that calculate brain volume and surface area using morphological methods from MRI images of various anatomical structures.
The effectiveness of the Negative Selection Algorithm used in patient detection systems has been clearly demonstrated by our research. During the patient detection phase, the time it takes for candidate detectors to achieve core set tolerance increases exponentially with the number of core sets. This occurs due to decreased efficiency and the production of many spare detectors. To address these issues, a novel patient detection framework based on negative selection theory is proposed.
The Negative Selection Algorithm (NSA) is an algorithm within Artificial Immune Systems that mimics how the body's immune system creates T-cells that do not attack "self" cells. Learning is performed with "normal" data. It generates random detectors. If a detector matches the "normal" data, it is destroyed (negative selection). Detectors that do not match the normal data monitor newly arrived data. If a detector matches a new data, it is marked as an "anomalous" (non-self) or an "anomaly." Its strength is that it is very effective for anomaly detection and classification. Its weakness is that it is difficult to produce efficient detectors. Randomly generating detectors can leave large gaps in the search space (non-self-space) or lead to the unnecessary creation of too many detectors (computational overhead). This algorithm can create a very powerful anomaly detection model, especially in cybersecurity (network intrusion detection), industrial systems (fault detection) or complex biological data (cancer detection).
Our study surpassed the 94% classification accuracy achieved by Sahebzamani et al. [43]. The results of this study demonstrate that a dataset created with the selected features (regions) can be successful in detecting and classifying epilepsy. It also demonstrates the detection success of the optimized hybrid kNN-NSA for this problem.
We also believe that it may be effective in diagnosing epilepsy in regions not previously reported in the literature, such as WM hypointensities, ventral DC, and choroid plexus. We believe that performing different segmentation and volume analyses on these regions could contribute to the literature.
A literature review reveals very few studies classifying brain volume and surface area in epilepsy. We believe this study will contribute to literature.

Author Contributions

All authors contributed to the study conception and design. Material preparation, data collection and analysis were performed by [Orhan Bölükbaş] and [Harun Uğuz]. The first draft of the manuscript was written by [Epilepsy detected using a new method based on volumetric analysis results from brain MR images] and all authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.

Funding

This research received no external funding

Institutional Review Board Statement

This article does not contain any studies with human participants or animals performed by any of the authors.

Data Availability Statement

The EpilepsyMRI dataset generated during and/or analyzed during the current study are not publicly available due to but are available from the corresponding author on reasonable request. EpilepsyMRI dataset, which consists of the data we originally obtained. For this dataset, DICOM format brain MRI images from the neurology archive of Aksaray University Aksaray Training and Research Hospital MR Image Service were used.

Acknowledgments

Acknowledgment you to everyone who contributed.

Conflicts of Interest

Author Orhan Bölükbaş declares that he has no conflict of interest. Author Harun Uğuz declares that she has no conflict of interest.

References

  1. Özçelik, Ö.; Acer, N.; Doğanay, S.; Ertekin, T.; Çınar, Ş. Estimation of Cerebral Surface Area of the Newborn Brain Using Stereological Methods. Erciyes Med. Journal. 2013, 15(3), 136–141. [Google Scholar] [CrossRef]
  2. Kürkcüoglu, A.; Zagyapan, R.; Pelin, C. Stereological Evaluation of Temporal Lobe/Telencephalon Volume in Temporal Lobe Epilepsy Using the Cavalieri Principle. Turk. Neurosurg. 2010, 20(3), 358–363. [Google Scholar] [CrossRef]
  3. Bingöl, A. C.; Aktekin, B.; Agan, K.; Arman, F.; Aslan, K.; Aykutlu, E.; Baklan, B.; Baykan, B.; Bebek, N.; Bilir, E.; Bora, İ.; Bozdemir, H.; Gürses, C.; Kavrak, N.; Özkara, Ç.; Saygı, S.; Velioğlu, S. Epilepsy Guide. Epilepsy 2012, 18(1), 26–38. [Google Scholar]
  4. Kınay, D. Neuroimaging in Epilepsy Surgery. Epilepsy 2012, 18(1), 18–29. [Google Scholar] [CrossRef]
  5. Başaran, Ş.; Kutlu, A.; Anık, Y.; Efendi, H.; Komşuoğlu, S.; Ş. The Relationship Between Volumetric Changes of Hippocampal and Extrahippocampal Areas and Etiological and Clinical Factors in Patients with Mesial Temporal Lobe Epilepsy with Hippocampal Sclerosis. Türkiye Clin. J. Med. Sci. 2003, 34(4), 353–362. [Google Scholar] [CrossRef]
  6. Caplan, R.; Levitt, J.; Siddarth, P.; Wu, K. N.; Gurbani, S.; Sankar, R.; Shields, W.D. Frontal and temporal volumes in Childhood Absence Epilepsy. Epilepsia 2009, 50(11), 2466–72. [Google Scholar] [CrossRef]
  7. Kemmotsu, N.; Girard, H. M.; Bernhardt, B. C.; Bonilha, L.; Lin, J. J.; Tecoma, E. S.; Iragui, V. J.; Hagler, D. J.; Halgren, E.; McDonald, C. R. MRI analysis in temporal lobe epilepsy: cortical thinning and white matter disruptions are related to side of seizure onset. Epilepsia 2011, 2(12), 2257–66. [Google Scholar] [CrossRef]
  8. Rebecca S. N., Louis L., Gail S. B., Sanjay M. S., Philippa A. B., Simon D. S., Josemir W. A. S., Duncan J. S.: Cerebral Damage in Epilepsy: A Population-based Longitudinal Quantitative MRI Study. Epilepsia 2005, 46(9), 1482–1494. [CrossRef]
  9. Theodore, W. H.; DeCarli, C.; Gaillard, W. D. Total Cerebral Volume Is Reduced in Patients with Localization-Related Epilepsy and a History of Complex Febrile Seizures. Arch. Neurol. 2003, 60, 250–252. [Google Scholar] [CrossRef]
  10. Keller, S. S.; Gerde, S. J.; Mohammadi, S.; Kellinghaus, C.; Kugel, H.; Deppe, K.; Ringelstein, E. B.; Ever, S.; Schwindt, W.; Deppe, M. Volume Estimation of the Thalamus Using FreeSurfer and Stereology: Consistency Beetwen Methods. NeuroInform 2012, 10, 341–350. [Google Scholar] [CrossRef] [PubMed]
  11. Salmenpera, T.; Kalviainen, R.; Partanen, K.; Mervaala, E.; Pitkanen, A. MRI volumetry of the hippocampus, amygdala, entorhinalcortex and perirhinal cortex after status epilepticus. Epilepsy Res. 2000, 40, 155–170. [Google Scholar] [CrossRef]
  12. Kalviainen, R.; Salmenpera, T.; Partanen, K.; Mervaala, E.; Pitkanen, A. MRI volumetry and T2 relaxometry of the amygdala in newly diagnosed and chronic temporal lobe epilepsy. Epilepsy Res. 1997, 28, 39–50. [Google Scholar] [CrossRef]
  13. Peng, B.; Wu, L.; Zhang, L.; Chen, Y. The relationship between hippocampal volumes and nonverbal memory in patients with medial temporal lobe epilepsy. Epilepsy Res. 2014, 108(10), 1839–44. [Google Scholar] [CrossRef]
  14. Park, K. M.; Han, Y. H.; Kim, T. H.; Mun, C. W.; Shin, K. J.; Ha, S. Y.; Park, J.; Hur, Y. J.; Kim, H. Y.; Park, S. H.; Kim, S. E. Cerebellar white matter changes in patients with newly diagnosed partial epilepsy of unknown etiology. Clin. Neurol. Neurosurg. 2015, 138, 25–30. [Google Scholar] [CrossRef] [PubMed]
  15. Hutchinson, E.; Pulsipher, D.; Dabbs, K.; Gutierrez, A.; Sheth, M.; Jones, J.; Seidenberg, M.; Meyerand, E.; Hermann, B. Children with new-onset epilepsy exhibit diffusion abnormalities in cerebral white matter in the absence of volumetric differences. Epilepsy Res. 2010, 88, 208–14. [Google Scholar] [CrossRef]
  16. Cao, B.; Tang, Y.; Li, J.; Zhang, X.; Shang, H. F.; Zhou, D. A meta-analysis of voxel-based morphometry studies on gray matter volume alteration in juvenile myoclonic epilepsy. Epilepsy Res. 2013, 106(3), 370–7. [Google Scholar] [CrossRef]
  17. Andrew, D. N.; Hal, B. The role of subcortical structures in human epilepsy. Epilepsy Behav. 2002, 3, 219–231. [Google Scholar] [CrossRef]
  18. Zelko, F. A.; Pardoe, H. R.; Blackstone, S. R.; Jackson, G. D.; Berg, A. T. Regional brain volumes and cognition in childhood epilepsy: does size really matter? Epilepsy Res. 2014, 108(4), 692–700. [Google Scholar] [CrossRef]
  19. Bernasconi, N.; Duchesne, S.; Janke, A.; Lerch, J.; Collins, D. L.; Bernasconi, A. Whole-brain voxel-based statistical analysis of gray matter and white matter in temporal lobe epilepsy. NeuroImage. 2004, 23(2), 717–723. [Google Scholar] [CrossRef] [PubMed]
  20. Keller, S. S.; Wilke, M.; Wieshmann, U. C.; Sluming, A. V.; Roberts, N. Comparison of standard and optimized voxel-based morphometry for analysis of brain changes associated with temporal lobe epilepsy. NeuroImage. 2004, 23(3), 860–868. [Google Scholar] [CrossRef] [PubMed]
  21. Bonilha, L.; Rorden, C.; Castellano, G.; Cendes, F.; Li, L. M. Voxel-based morphometry of the thalamus in patients with refractory medial temporal lobe epilepsy. NeuroImage. 2005, 25(3), 1016–1021. [Google Scholar] [CrossRef]
  22. Kim, J. H.; Lee, J. K.; Koh, S. B.; Lee, S. A.; Lee, J. M.; Kim, S. I.; Kang, J. K. Regional grey matter abnormalities in juvenile myoclonic epilepsy: A voxel-based morphometry study. NeuroImage 2007, 37(4), 1132–1137. [Google Scholar] [CrossRef] [PubMed]
  23. Pulsipher, D. T.; Seidenberg, M.; Morton, J. J.; Geary, E.; Parrish, J.; Hermann, B. MRI volume loss of subcortical structures in unilateral temporal lobe epilepsy. Epilepsy Behav. 2007, 11(3), 442–9. [Google Scholar] [CrossRef] [PubMed]
  24. Elst, L. T.; Groffmann, M.; Ebert, D.; Schulze-Bonhage, A. Amygdala volume loss in patients with dysphoric disorder of epilepsy. Epilepsy Behav. 2009, 16(1), 105–112. [Google Scholar] [CrossRef] [PubMed]
  25. O'Dwyer, R.; Wehner, T.; LaPresto, E.; Ping, L.; Tkach, J.; Noachtar, S.; Diehl, B. Differences in corpus callosum volume and diffusivity between temporal and frontal lobe epilepsy. Epilepsy Behav. 2010, 19, 376–382. [Google Scholar] [CrossRef]
  26. Peng, S. J.; Harnod, T.; Tsai, Z. J.; Ker, M. D.; Chiou, J. C.; Chiueh, H.; Wu, C. Y.; Hsin, Y. L. Evaluation of subcortical grey matter abnormalities in patients with MRI-negative cortical epilepsy determined through structural and tensor magnetic resonance imaging. BMC Neurol. 2014, 14, 104–113. [Google Scholar] [CrossRef]
  27. Keihaninejad, S.; Heckemann, R. A.; Gousias, I. S.; Hajnal, J. V.; Duncan, J. S.; Aljabar, P.; Rueckert, D.; Hammers, A. Classification and Lateralization of Temporal Lobe Epilepsies with and without Hippocampal Atrophy Based on Whole-Brain Automatic MRI Segmentation. PLoS ONE 2012, 7(4), 1–12. [Google Scholar] [CrossRef]
  28. Briellmann Regula, R. S.; Jackson, G. D.; Kalnins, R.; Berkovic, S. F. Hemicranial Volume Deficits in Patients with Temporal Lobe Epilepsy With and Without Hippocampal Sclerosis. Epilepsia. 1998, 39(11), 1174–1181. [Google Scholar] [CrossRef]
  29. Chandola, V.; Banerjee, A.; Kumar, V. Anomaly detection: A survey. ACM Comput. Surv. (CSUR) 2009, 41(3), 1–58. [Google Scholar] [CrossRef]
  30. Forrest, S.; Perelson, A. S.; Allen, L.; Cherukuri, R. Self-nonself discrimination in a computer. Proceedings of IEEE Symposium on Research in Security and Privacy, 1994. [Google Scholar]
  31. Zimek, A.; Schubert, E.; Kriegel, H. P.: A survey on unsupervised outlier detection in high-dimensional data. Stat. Anal. Data Min. 2012, 5(5), 363–387. [Google Scholar] [CrossRef]
  32. Bölükbaş, O.; Uğuz, H. Performance of Negative Selection Algorithms in Patient Detection and Classification. In Nature-Inspired Intelligent Techniques for Solving Biomedical Engineering Problems; Köse, U., Ed.; IGI Global: Hershey PA, USA, 2017; pp. 78–102. [Google Scholar] [CrossRef]
  33. Zhao, X.; Lin, W.; Hao, J.; Zuo, X.; Yuan, J. Clustering and pattern search for enhancing particle swarm optimization with Euclidean spatial neighborhood search. Neurocomputing 2016, 171, 966–981. [Google Scholar] [CrossRef]
  34. Bölükbaş, O.; Haber, Z. Uğuz H.: The Performance Evolution of the New Scatter Search Snake Optimization Algorithm for Feature Selection Problems. Arab. J. Sci. Eng. 2025. [Google Scholar] [CrossRef]
  35. Cantor-Rivera, D.; Khan, A. R.; Goubran, M.; Mirsattari, S. M.; Peters, T. M. Detection of temporal lobe epilepsy using support vector machines in multi-parametric quantitative MR imaging. Comput. Med. Imaging Graph. 2015, 41, 14–28. [Google Scholar] [CrossRef]
  36. Rudie, J. D.; Colby, J. B.; Salamon, N. Machine learning classification of mesial temporal sclerosis in epilepsy patients. Epilepsy Res. 2015, 117, 63–9. [Google Scholar] [CrossRef]
  37. Kodipaka, S.; Vemuri, B. C.; Rangarajan, A.; Leonard, C. M.; Schmallfuss, I.; Eisenschenk, S. Kernel Fisher discriminant for shape-based classification in epilepsy. Med. Image Anal. 2007, 11(1), 79–90. [Google Scholar] [CrossRef]
  38. Torres-Velázquez, M.; Hwang, G.; Cook, C. J.; Hermann, B.; Prabhakaran, V.; Meyerand, M. E.; McMillan, A. B. Multi-Channel Deep Neural Network For Temporal Lobe Epilepsy Classification Using Multimodal Mri Data. IEEE 17th International Symposium on Biomedical Imaging Workshops (ISBI Workshops)., 2020. [Google Scholar] [CrossRef]
  39. Chen, S.; Zhang, J.; Ruan, X.; Deng, K.; Zhang, J.; Zou, D.; He, X.; Li, F.; Bin, G.; Zeng, H.; Huang, B. Voxel-based morphometry analysis and machine learning based classification in pediatric mesial temporal lobe epilepsy with hippocampal sclerosis. Brain Imaging Behav. 2020, 14, 1945–1954. [Google Scholar] [CrossRef]
  40. Gaizo, J. D.; Mofrad, N.; Jensen, J. H.; Clark, D.; Glenn, R.; Helpern, J.; Bonilha, L. Using machine learning to classify temporal lobe epilepsy based on diffusion MRI. Brain Behav. 2017, 7, e00801. [Google Scholar] [CrossRef]
  41. Vergun, S.; Gaggl, W.; Nair, V. A.; Suhonen, J. I.; Birn, R. M.; Ahmed, A. S.; Meyerand, M. E.; Reuss, J.; DeYoe, E. A.; Prabhakaran, V. Classification and Extraction of Resting State Networks Using Healthy and Epilepsy fMRI Data. Front. Neurosci. 2016, 10(440), 1–13. [Google Scholar] [CrossRef]
  42. Zhou, B.; An, D.; Xiao, F.; Niu, R.; Li, W.; Li, W.; Tong, X.; Kemp, G. J.; Zhou, D.; Gong, Q.; Lei, D. Machine learning for detecting mesial temporal lobe epilepsy by structural and functional neuroimaging. Front Med. 2020, 14(5), 630–641. [Google Scholar] [CrossRef]
  43. Sahebzamani, G.; Saffar, M.; Soltanian-Zadeh, H. Machine Learning Based Analysis of Structural MRI for Epilepsy Diagnosis. 2019 4th International Conference on Pattern Recognition and Image Analysis (IPRIA), Tehran, Iran, 2019, 6 and 7 March; IEEE. [Google Scholar] [CrossRef]
  44. Keller, S. S.; Gerdes, J. S.; Mohammadi, S.; Kellinghaus, C.; Kugel, H.; Deppe, K.; Ringelstein, E. B.; Evers, S.; Schwindt, W.; Deppe, M. Volume estimation of the thalamus using freesurfer and stereology: consistency between methods. Neuroinformatics 2012, vol. 10, 341–350. [Google Scholar] [CrossRef]
  45. Fischl, B.; Salat, D. H.; Busa, E.; Albert, M.; Dieterich, M.; Haselgrove, C.; Kouwe, A.; Killiany, R.; Kennedy, D.; Klaveness, S.; Montillo, A.; Makris, N.; Rosen, B.; Dale, A. M. Whole Brain Segmentation: Neuro technique Automated Labeling of Neuroanatomical Structures in the Human Brain. Neuron 2002, 33, 341–355. [Google Scholar] [CrossRef]
  46. Guyon, I.; Elisseeff, A. An introduction to variable and feature selection. J. Mach. Learn. Res. 2003, 3, 1157–1182. [Google Scholar]
  47. Özgür, A.; Erdem, H. Feature selection and multiple classifier fusion using genetic algorithms in intrusion detection systems. J. Fac. Eng. Archit. Gazi Univ. 2018, 33, 1 75–87. [Google Scholar] [CrossRef]
  48. Kalaycı, Ş. SPSS Applied Multivariate Statistical Techniques; Ankara, Türkiye, 2009. [Google Scholar]
  49. Dash, M.; Liu, H. Feature selection for classification. Intell. Data Anal. 1997, 1(3), 131–156. [Google Scholar] [CrossRef]
  50. Liu, H.; Yu, L. Toward integrating feature selection algorithms for classification and clustering. IEEE Trans. Knowl. Data Eng. 2005, 17(4), 491–502. [Google Scholar] [CrossRef]
  51. Zhao, X.; Lin, W.; Hao, J.; Zuo, X.; Yuan, J. Clustering and pattern search for enhancing particle swarm optimization with Euclidean spatial neighborhood search. Neurocomputing 2016, 171, 966–981. [Google Scholar] [CrossRef]
  52. García Nieto, P.J.; García-Gonzalo, E.; Alonso Fernández, J. R.; Díaz Muñiz, C. A hybrid PSO optimized SVM-based model for predicting a successful growth cycle of the Spirulina platensis from raceway experiments data. J. Comput. Appl. Math. 2016, 291, 293–303. [Google Scholar] [CrossRef]
  53. Inan, G.; Ubeyli, E. Diabetes Diagnosis by Multilayer Perceptron Neurol Networks. J. Fac. Eng. Archit. Gazi Univ. 2006, 21(2), 319–326. [Google Scholar]
  54. Breiman, L. Random Forests. Mach. Learn. 2001, 45(1), 5–32. [Google Scholar] [CrossRef]
  55. Bölükbaş, O.; Uğuz, H. Performance of Negative Selection Algorithms in Patient Detection and Classification. In Nature-Inspired Intelligent Techniques for Solving Biomedical Engineering Problems; Köse, U., Ed.; IGI Global in Hershey PA USA, 2017; pp. 78–102. [Google Scholar] [CrossRef]
  56. Chandola, V.; Banerjee, A.; Kumar, V. Anomaly detection: A survey. ACM Comput. Surv. (CSUR) 2009, 41(3), 1–58. [Google Scholar] [CrossRef]
  57. Zimek, A.; Schubert, E.; Kriegel, H. P.: A survey on unsupervised outlier detection in high-dimensional data. Stat. Anal. Data Min. 2012, 5(5), 363–387. [Google Scholar] [CrossRef]
  58. Caplova, Z.; Svabova, P. IBM SPSS statistics, in Statistics and Probability in Forensic Anthropology. Elsevier 2020, 343–352. [Google Scholar] [CrossRef]
  59. Beheshti, I.; Sone, D.; Maikusa, N.; Kimura, Y.; Shigemoto, Y.; Sato, N.; Matsuda, H. Accurate lateralization and classification of MRI- negative 18F-FDG-PET-positive temporal lobe epilepsy using double inversion recovery and machine-learning. Comput. Biol. Med. 2021, 137, 104805. [Google Scholar] [CrossRef] [PubMed]
  60. Nguyen, R. D.; Kennady, E. H.; Smyth, M. D.; Zhu, L.; Pao, L. P.; Swisher, S. K.; Rosas, A.; Mitra, A.; Patel, R. P.; Lankford, J.; Von Allmen, G.; Watkins, M. W.; Funke, M. E.; Shah, M. N. Convolutional neural networks for pediatric refractory epilepsy classification using resting-state functional magnetic resonance imaging. World Neurosurg. 2021, 149, e1112–e1122. [Google Scholar] [CrossRef]
  61. Princich, J. P.; Donnelly-Kehoe, P. A.; Deleglise, A.; Vallejo-Azar, M. N.; Pascariello, G. O.; Seoane, P.; Veron Do Santos, J. G.; Collavini, S.; Nasimbera, A. H.; Kochen, S. Diagnostic performance of MRI volumetry in epilepsy patients with hippocampal sclerosis supported through a random forest automatic classification algorithm. Front. Neurol. 2021, 12, 613967. [Google Scholar] [CrossRef]
  62. Huang, J.; Xu, J.; Kang, L.; Zhang, T. Identifying epilepsy based on deep learning using DKI images. Front. Neurosci. 2020, 14, 590815. [Google Scholar] [CrossRef]
  63. Abbasi, B.; Goldenholz, D. M. Machine learning applications in epilepsy. Epilepsia 2019, 60, 2037–2047. [Google Scholar] [CrossRef]
  64. Zhao, X.; Lin, W.; Hao, J.; Zuo, X.; Yuan, J. Clustering and pattern search for enhancing particle swarm optimization with Euclidean spatial neighborhood search. Neurocomputing. 2016, 171, 966–981. [Google Scholar] [CrossRef]
  65. Belke, M.; Zahnert, F.; Steinbrenner, M.; Halimeh, M.; Miron, G.; Tsalouchidou, P.; Linka, L.; Keil, B.; Jansen, A.; Möschl, V.; Kemmling, A.; Nimsky, C.; Rosenow, F.; Menzler, K.; Knake, S. Automatic detection of hippocampal sclerosis in patients with epilepsy. Epilepsia. 2025, 66, 3852–3864. [Google Scholar] [CrossRef]
  66. Aslan, H.; Bölükbaş, O.; Uğuz, H. A new method for diagnosing epilepsy disease from structural brain mr images. Kahramanmaraş Sütçü İMam. Univ. J. Eng. Sci. 2025, 28(4). [Google Scholar]
Figure 1. Process steps.
Figure 1. Process steps.
Preprints 217118 g001
Figure 2. Feature extraction process steps with FreeSurfer Program [39].
Figure 2. Feature extraction process steps with FreeSurfer Program [39].
Preprints 217118 g002
Figure 3. SSSO Flow Chart [34].
Figure 3. SSSO Flow Chart [34].
Preprints 217118 g003
Figure 4. Flowchart of Training and Testing Stages of Standard Negative Selection Algorithm.
Figure 4. Flowchart of Training and Testing Stages of Standard Negative Selection Algorithm.
Preprints 217118 g004
Figure 5. Performances of machine learning methods on MWU-35 and SSSO-13 datasets.
Figure 5. Performances of machine learning methods on MWU-35 and SSSO-13 datasets.
Preprints 217118 g005
Figure 6. Comparison of the detection (%) success of the developed machine learning method.
Figure 6. Comparison of the detection (%) success of the developed machine learning method.
Preprints 217118 g006
Table 1. Precision (PRE) to measure the accuracy of the detections.
Table 1. Precision (PRE) to measure the accuracy of the detections.
Performance Metric Formula
Precision (Pre) T P T P + F P
Recall (Rcall) T P T P + F N
F1-score 2 P r e R e P r e + R e
Accuracy (Acc) T P + T N T P + F P + T N + F N
Table 2. Regions extracted from the Cortical and Subcortical Structure of the Brain.
Table 2. Regions extracted from the Cortical and Subcortical Structure of the Brain.
Extracted Brain Regions
1 Left hemisphere cortical gray matter 26 Left-vessel
2 Right hemisphere cortical gray matter 27 Left-choroid-plexus
3 Total cortical gray matter 28 Right-Lateral-Ventricle
4 Left hemisphere cortical white matter 29 Right-Inf-Lat-Vent
5 Right hemisphere cortical white matter 30 Right-Cerebellum-White-Matter
6 Total cortical white matter 31 Right-Cerebellum-Cortex
7 Subcortical gray matter 32 Right-Thalamus-Proper
8 Total gray matter 33 Right-Caudate
9 Estimated Total Intracranial 34 Right-Putamen
10 Left-Lateral-Ventricle 35 Right-Pallidum
11 Left-Inf-Lat-Vent 36 Right-Hippocampus
12 Left-Cerebellum-White-Matter 37 Right-Amygdala
13 Left-Cerebellum-Cortex 38 Right-Accumbens-area
14 Left-Thalamus 39 Right-VentralDC
15 Left-Caudate 40 Right-vessel
16 Left-Putamen 41 Right-choroid-plexus
17 Left-Pallidum 42 5th-Ventricle
18 3rd-Ventricle 43 WM-hypointensities
19 4th-Ventricle 44 non-WM-hypointensities
20 Brain-Stem 45 Optic-Chiasm
21 Left-Hippocampus 46 CC_Posterior
22 Left-Amygdala 47 CC_Mid_Posterior
23 CSF 48 CC_Central
24 Left-Accumbens-area 49 CC_Mid_Anterior
25 Left-VentralDC 50 CC_Anterior
Table 3. Independent-Samples Mann Whitney U Test analysis results (p<0.05).
Table 3. Independent-Samples Mann Whitney U Test analysis results (p<0.05).
Region Sig. Region Sig.
1 Left hemisphere cortical gray matter 0,136 26 Left-vessel 0,197
2 Right hemisphere cortical gray matter 0,84 27 Left-choroid-plexus 0,001
3 Total cortical gray matter 0,85 28 Right-Lateral-Ventricle 0,002
4 Left hemisphere cortical white matter 0,227 29 Right-Inf-Lat-Vent 0
5 Right hemisphere cortical white matter 0,144 30 Right-Cerebellum-White-Matter 0,001
6 Total cortical white matter 0,159 31 Right-Cerebellum-Cortex 0,007
7 Subcortical gray matter 0 32 Right-Thalamus-Proper 0,863
8 Total gray matter 0,001 33 Right-Caudate 0
9 Estimated Total Intracranial 0,011 34 Right-Putamen 0
10 Left-Lateral-Ventricle 0 35 Right-Pallidum 0
11 Left-Inf-Lat-Vent 0 36 Right-Hippocampus 0
12 Left-Cerebellum-White-Matter 0,069 37 Right-Amygdala 0
13 Left-Cerebellum-Cortex 0,001 38 Right-Accumbens-area 0
14 Left-Thalamus-Proper 0,038 39 Right-VentralDC 0,001
15 Left-Caudate 0,119 40 Right-vessel 0,72
16 Left-Putamen 0 41 Right-choroid-plexus 0
17 Left-Pallidum 0 42 5th-Ventricle 0,757
18 3rd-Ventricle 0,148 43 WM-hypointensities 0
19 4th-Ventricle 0,001 44 non-WM-hypointensities 0
20 Brain-Stem 0 45 Optic-Chiasm 0
21 Left-Hippocampus 0 46 CC_Posterior 0
22 Left-Amygdala 0 47 CC_Mid_Posterior 0,004
23 CSF 0,159 48 CC_Central 0,006
24 Left-Accumbens-area 0 49 CC_Mid_Anterior 0,225
25 Left-VentralDC 0,01 50 CC_Anterior 0
Table 4. Performance Comparison of Various Optimization Algorithms on the Epilepsy Dataset [34].
Table 4. Performance Comparison of Various Optimization Algorithms on the Epilepsy Dataset [34].
acc error sensitive spec prec f1
SSSO 0.8712 0.1288 0.9551 0.7375 0.8573 0.9036
GNDO 0.8638 0.1362 0.9301 0.7586 0.8644 0.8961
SMA 0.8659 0.1341 0.9336 0.7571 0.8644 0.8977
EO 0.8638 0.1362 0.9219 0.7711 0.8698 0.8951
MRFO 0.8596 0.1404 0.9268 0.7521 0.8601 0.8922
ASO 0.8599 0.1401 0.9401 0.7311 0.8520 0.8939
HHO 0.8384 0.1616 0.9050 0.7282 0.8469 0.8750
HGSO 0.8547 0.1453 0.9254 0.7432 0.8588 0.8908
PFA 0.8702 0.1298 0.9567 0.7318 0.8547 0.9028
PRO 0.8731 0.1269 0.9468 0.7546 0.8652 0.9041
SS 0.8287 0.1713 0.8950 0.7218 0.8445 0.8690
GA 0.8649 0.1351 0.9467 0.7336 0.8546 0.8983
PSO 0.8605 0.1395 0.9287 0.7525 0.8628 0.8946
ACO 0.8598 0.1402 0.9421 0.7286 0.8514 0.8945
DE 0.8585 0.1415 0.9183 0.7629 0.8650 0.8909
ABC 0.8662 0.1338 0.9500 0.7321 0.8545 0.8997
GWO 0.8596 0.1404 0.9169 0.7679 0.8675 0.8915
WOA 0.8618 0.1382 0.9253 0.7604 0.8660 0.8947
Table 5. Features obtained with the SSSO algorithm.
Table 5. Features obtained with the SSSO algorithm.
Brain Regions (Features)
1 Subcortical gray matter
2 Left-Cerebellum-Cortex
3 Left-Thalamus
4 Left-Putamen
5 Left-VentralDC
6 Left-choroid-plexus
7 Right-Putamen
8 Right-Hippocampus
9 Right-VentralDC
10 Right-choroid-plexus
11 WM-hypointensities
12 CC_Posterior
13 CC_Central
Table 6. Parameters used in machine learning algorithms.
Table 6. Parameters used in machine learning algorithms.
SVM kNN RF MLP NSA
Kernel = RBF Number of Neighbours = 3 Size of each bag = 7 Learning rate = 0.003 Rs: 0,33
Cost(C) = 150 Distance function = Euclidean Max depth = 0 Momentum = 0.9 Detector: 5000
No. of trees = 20 Hidden layers = 35
Table 7. Detection Rate, Accuracy, Precision, Recall, and F1-score values for each classifier by 35 and 13 regions to predict epilepsy.
Table 7. Detection Rate, Accuracy, Precision, Recall, and F1-score values for each classifier by 35 and 13 regions to predict epilepsy.
Datasets Method Acc (%) Rcall (%) Pre (%) F1 (%)
MWU-35 SVM 91,80 82,70 95,40 88,60
kNN 82,70 72,00 80,60 76,06
RF 87,80 76,00 90,50 82,62
MLP 86,20 76,00 86,40 80,90
NSA 94,30 85,33 100,00 92,08
Hybrid kNN-NSA 97,45 93,33 100,00 96,55
SSSO-13[45] SVM 86,20 78,70 84,30 81,40
kNN 87,20 77,30 87,90 82,26
RF 86,20 77,30 85,30 81,10
MLP 85,70 74,70 84,30 79,21
NSA 97,45 93,33 100,00 96,55
Hybrid kNN-NSA 98,45 98,67 99,10 98,88
Table 8. An overview of the most recent studies in the diagnosis of epilepsy.
Table 8. An overview of the most recent studies in the diagnosis of epilepsy.
Study Method Number of Feature Dataset Acc (%)
Keihaninejad et al. [27] SVM 83 80 Epilepsy
28 Healthy
89
Canto-Rivera et al. [35] SVM 10 17 Epilepsy
19 Healthy
88.9
Rudie et al. [36] SVM 20 85 Epilepsy
84 Healthy
81
Kodipaka et al. [37] SVM 762 31 Epilepsy
23 Healthy
80.65
Zhou et al. [42] SVM 34 74 Epilepsy
74 Healthy
84
Sahebzamani et al. [43] SVM 36 10 Epilepsy
7 Healthy
94
Beheshti et al. [59] SVM 136 39 Epilepsy
24 Healthy
87.30
Nguyen et al. [60] CNN 36 63 Epilepsy
259 Healthy
78
Princich et al. [61] RF 20 57 Epilepsy
61 Healthy
90.7
Huang et al. [62] CNN-SVM 36 59 Epilepsy
70 Healthy
90.8
Proposed Method [34] kNN-NSA 13 75 Epilepsy
121 Healthy
98.45
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2026 MDPI (Basel, Switzerland) unless otherwise stated

Accessibility

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings