Robust Optimization of electroencephalograph (EEG) Signals for Epilepsy Seizure Prediction by utilizing VSPO Genetic Algorithms with SVM and Machine Learning Methods

Objectives: To optimize the EEG signals in order to predict the epileptic seizures at early stage and to improve the accuracy level by employing genetic algorithm and machine learning methods. Methods: Virus Swarm Particle Optimization Technique (VSPO) based Genetic algorithm is utilized for the purpose of feature selection and Machine Learning SVM technique is utilized for classiﬁcation of EEG signals to determine seizure or non-seizure. The Discrete Wavelet Transform (DWT) is utilized for factor extraction to assess the recurrence range of EEG signals associated with seizures, to partition them into separate spaces using DWT of EEG symbols, and to consider the variations between seizure and normal functionality. VPSO-GA with SVM extracts the features from the Andrzejak R G dataset and then selects the relevant function to perform classiﬁcation and prediction in order to optimize the EEG signals for early ES prediction and to improve the accuracy level. To demonstrate the eﬀectiveness of the proposed algorithm, MATLAB is used for implementation. The performance results are compared to the existing baseline versions FCM-MPSO, EDMLC and K-MODE. Findings: EEG signals are optimized and early ES prediction is done with 98.13% accuracy level, 98.03% sensitivity, 98.01% speciﬁcity, 98.90% Precision, 97.96% Recall, 191 True Positive, 104 True Negative and 98.46% F-Score to predict the seizure in an optimized manner which is high compared to the existing versions. Novelty: According to the ﬁndings of the comprehensive study, the proposed algorithm VPSO-SVM outperforms FCM-MPSO, EDMLC and K-MODE in terms of accuracy level of epileptic seizure prediction at early stage by optimizing the EEG signals in a robust manner. pathological epileptic GA, ML, NB techniques to study 54-DWT EEG signal waves, bi-class epilepsy detection time the use of multi-resolution wavelets, detect sudden epileptic automatically in EEG signals. Using DWT, EEG five sub wavelet approximately 20-24 dataset average sensitivity specificity more than 90% all class modes, diagnose two simultaneously in a dynamic way. epilepsy EEG signals, MC epilepsy short-term four-part processing EEG time interictal


Introduction
Epilepsy is portrayed by the occurrence of epileptic seizures. An epileptic seizure is a brief period of symptoms caused by abnormal electrical processes and anarchy disorder in the human brain. Medication is the most widespread treatment for epileptic seizures irrespective of the age. At present, epilepsy affects over 60 million people worldwide (based on 2018 population survey marked), the majority of those who live in less developed or emerging countries. Early identification of seizure makes for more successful survivor care to treat early by copious treatments. When seizures cannot be predicted early, a victim's actions are restricted for his or her own protection and it is very limited too. Surgery and medicinal medicines were the most successful treatments of epilepsy, but it was shown that operations failed to enable patients to dynamically avoid or reducing seizures. If medications fail, the best way to deal with the condition is to be able to predict seizures before they begin. Because the initial stage of a seizure does not appear to all patients, smart devices are necessary that can diagnose seizure without the hospitalization and monitoring of a patient. Previous research has shown that the feature vector can be minimized and therefore the prediction speed and precision can be boost using an efficient optimization method such as a genetic algorithm. The present research focuses on the efficiency of predictions by the use of VSPO genetic algorithms and SVM and compares the findings with the results of other methods. Various levels of improvised EEG signal states are represented, and the duration of the seizure window is determined using the genetic algorithm, resulted in the identification of pre seizure categories. However, the wavelet signals are not converted for the initial stage of seizure prediction (1). EMDT is employed for the feature mining for dynamic prediction of the epilepsy and to eradicate the noise from signal during anticipated and genuinely optimistic phases. Due to weak wavelet transformation signals, accurate methods have been established, however, the prediction accuracy cannot be demonstrated clearly. In order to minimize the time and improve the depiction accuracy level, classifications are evaluated using the FCM with MPSODT model (2)(3)(4) . Instant energy correlated with changes in the electro signals is calculated based on the features describing energy activity over time from different dimensions. In order to provide output labels, the functions are measured and graded. The knowledge of energy evolution is used in the production of instantaneous energy (5). The authors explore to differentiate between natural and pathological signals immediately and to improve the accuracy of epileptic seizures while reducing the expense of computing. The author uses GA, ML, NB techniques to study 54-DWT EEG signal waves, but the procedure has minimum disadvantage due to the bi-class epilepsy detection time rises (6). With the use of multi-resolution wavelets, researchers created a method to detect sudden epileptic attacks automatically in EEG signals. Using DWT, EEG signals are broken down into five sub bands of frequency. The wavelet energy distribution at each sub-band level is also the main parameter for detecting convulsions to build up a series of functions (7). Deep learning algorithms were used by the author for seizure prediction research. This method includes scalp EEG signal preprocessing, automated feature extraction with a convolution neural network, and classification with vector machines. The suggested technique was tested on approximately 20-24 subjects from the CHBMT scalp EEG dataset and found to have an average sensitivity and specificity of more than 90% (8). In all class modes, a single approach is being used to diagnose two neurological conditions simultaneously in a dynamic way. For this cause, various EEG feature extraction and identification approaches are being researched in order to aid in the accurate diagnosis of developmental brain disorders such as epilepsy and other disorder syndrome. The researcher analyzes two types of EEG signals, SC and MC channel for epilepsy and other spectrum disorder detection (9). The short-term four-part processing technique is used in 30 SEC EEG windows to obtain information both in frequency and in time areas. The algorithm automatically provides optimum features for each patient to help differentiate preictal and interictal fragments. The technique may be applied to any other patient from any data collection without manual feature extraction (10). Researchers provide detailed review of emerging ML technologies in early prediction of seizures using the EEG signal in order to identify the gaps, problems and pitfalls in seizure prediction research and to suggest possible guidelines (11).
Few of the recent detection experiments were performed, but none of them explored the progress of EEG signals based epileptic seizure detection in automated medical support systems was identified. The main objective of this analysis is to explore briefly and clarify the different methods employed and their critical properties in this field of research (12,13) . Much of the EEG signal then comes from raw data and is used for indicating the exact location of epileptic sub-types by using the signal's capacity. All important elements of this approach are the identifying the appropriate wavelet to decompose EEG signals, the identification of an appropriate resolution and the measurement of an acceptable threshold are the most important forms in this method (14,15) . Many researchers proposed new way to identify the symptoms of epilepsy early by employing many DL and ML techniques in order to maximize the accuracy level in early stage itself (16)(17)(18)(19)(20). The Genetic Algorithm (GA) is used in signal segmentation applications for selecting suitable parameter values. To determine the precision of the techniques, both synthetic and electroencephalograph signals were tested (EEG). The results designate that sign segmentation is better compared to the initial form (21)(22)(23) . Level crossing EEG signals along with ML techniques are utilized for ES prediction for mobile health care and optimization of signals for early prediction is not met (24). 1D octal pattern is utilized for WT and EEG signals and the algorithm works on attacks recognition but not early seizure prediction by optimizing the signals (25). The techniques shall comply with https://www.indjst.org/ the following criteria for periodic operations by predicting the seizure in the early stages as follows.
• EEG Channel Aggregation: For each channel, the algorithm senses a series of seizures. The final collection of observed seizures would be the product of a consensus among the various channels. • Synthetic Signal Formation : All the boundaries of the brain are detected by the synthetic signal for most clear prediction of seizure in all stages. • Signal Analysis and Optimization: Optimization of EEG signals helps to improvise the accuracy level of the components and capturing styles after analyzing the signals in dynamic way. • Prediction of epilepsy seizure : Should have the capability of early prediction after noise removal from the signals and performs with seizure or non seizure output.
To resolve the early prediction and signal EEG optimization problems, numerous techniques have been developed. All of the researchers' previous metrics, on the other hand, were mostly based on seizure prediction rather than refining EEG signals for early accurate epilepsy prediction. The goal of this work is to create a novel algorithm to i) optimize the EEG signals (ii) early stage seizure prediction (iii) maximize the accuracy level of prediction by employing the VSPO and SVM, ML techniques iv) to identify the variations between attack and ordinary functionality.

Proposed Methodology
The effectiveness of seizure and non seizure early prediction is mandatory to avoid the situation goes worse. The proposed method aims to classify EEG signals as seizure or non-seizure, then perform frequency analysis on vigorous and epileptic signals to find the best response and optimize precision and true positive rate. Based on the signals optimized during the operation, the prediction is defined as linear or non linear. The positive and negative rates are determined based on the rate of section and set transformation. The epileptic region is specifically recorded in order to distinguish between deterministic and nondeterministic values. All the signals activities are measured in frequent intervals and the interval time is called latency time.
Learning the patterns of seizure epileptic helps to detect or diagnose the symptoms very early stage with high sensitivity and specificity. Decision making algorithm is also used to faster performance of prediction. Assume that E1 and E2 are the two epileptic states denotes interictal and preictal stage, the automatically the signals converts the squares and forms the D1 and D2 decomposition stage along with the spatial pattern and the scalp of subjects are derived by the below equation, where, TPR is True Positive rate and FPR is False Positive Rate, i determines the signals of wavelet passes through the process. Filtering, Segmenting, Patterning, Thresholding, Grouping and Aggregation are the major EGG optimizing parameters used to increase the level of accuracy with respect to prediction in the human brain. During the optimization process and it is impossible to locate the main EPS region because of the sudden and simultaneous outbreak of epilepsy electricity over a variety of cortical regions. Signals obtained with high resolution intracranial electrons are considered to be the best way to deeply study the scenario. Among the obtained signals the frequency level is calculated based on the percentage of electrodes passed during the seizure diagnosing. In the respected plot the DWT method is implemented for complete transformation of prediction level to the higher order level. DBS is applied during the scan to find the state whether it is normal or abnormal. DWT method is utilized to find out the level of frequency in all stages by using the below equation, where, R represents the computational time and frequency value during the EGG transmission process in all stages. F(time) calculates the frequency and wavelet transform time and stimulates the next process for signal optimization. In the above mentioned EEG time series, VSPO evaluated signs of deterministic and or low-dimensional structures against the null hypothesis that such properties are consistent with a diatonic static yet potentially non linear measurement system and regression model. During the prediction process in the brain, the process is deeply done and materials are trained completely for maximum prediction level attainment. The migrated level of EGG signals are calculated with the help of the below equation, where, Dsignals represents the direct passing signals and the TPR and FPR rate is calculated based on the transformation. tracerate is calculating the level of tracing in an early stage with time. R1 and S1 variables represents the range and signal flow in the process. https://www.indjst.org/

Data attainment and acquisition
The EEG datas for processing is completely extracted from Andrzejak R G, University of Bonn, Germany (26,27) . This category confines EEG data emanating from a single interval, specifically robust and epileptic subjects. These data was organized into five datasets: O, Z, F, N, and S, each of which comprises 100 EEG signal segments lasting 23.6 seconds. Sets O and Z were obtained from stable participants with their eyes open and closed separately; sets F and N were obtained from subjects in seizure-free states in various areas of the brain; and set S was obtained from a person in a seizure condition. Sets Z and S were automatically used for the current results. With the available datasets the EGG signals are generated by employs MATLAB code to spawn the EEG signal from the dataset. There are five EEG datasets that include both vigorous and epileptic subjects. All signals are used by the device to generate EEG signals. Each collection contains 100 signals; select a few from each and proceed to the next step that is decomposition of the produced EEG signals for the prediction analysis. The data distribution partially matches the tested data and the training data which is collected. Here comes the SVM is utilized to test the uncovered or unpartitioned data in a certain level. Various steps involved in feature extraction which includes, • Raw Data collection to compare and test the level of accuracy • Data preprocessing by removal of noisy, segment and filtration takes place • Data segmentation process is done for accurate pre processing results • Data partition takes place at certain level when needed • Feature extraction is done with PCA method and VSPO method • Classification is done for next decision process by the system • EGG patterns and optimized signals are found for spatial connectivity • Prediction of accuracy level and compared with tested data to measure the level During the initial stage EEG signal creation and decomposition is done at various levels by using the below equation. The system automatically builds the EEG signals for complete transformation of prediction to maximize the rate of accuracy.
where, Fsignals represents the False rate of the prediction level. a n binom represented the random components and evolution operators for each execution.

VSPO Genetic Algorithm for signal optimization
Virus Swarm Particle Optimization GA technique is employed for EEG signals optimization to increase the performance level. Viruses are commonly present in different organisms like water, air, and so on, with various modes of transmission. The random walk strategy, which occurs in a few mediums, became an opportunity for the virus to demonstrate its core activity to pass the signals and optimize the EEG signals easily, which continues until the neighbor part of brain is detected. The Gaussian method has a good track record of identifying the best global solutions during the optimization process. It is often used to characterize phenomena in the propagation section in order to maximize virus processing efficiency and keep away from the local optimum.
To maximize local search efficiency in space, it is important to reduce the number of Gaussian hops, which increases as the population in space grows, which is why the value is determined. Fresh populations are produced as finest neighboring, which is determined by Gaussian distribution and fine-tuned by the direction in which virus swarm searching is conducted during the signals transformation in the brain. The steps involved in GA described as follows, • Establish the number of individuals called virus particle • Initialize the population value to calculate the random rate value • Probability is calculated till the finest generations are met the conditions • Derive the fitness value • Selection of chromosomes for specific optimization of signals • Probability of C-over is calculated to pass the EEG optimized signals to next particle • Flipped the signals using mutation of virus particle • Select the best optimum level of accuracy https://www.indjst.org/ where, U pop i+1 denotes finite number of particles are selected and the optimum level is reached to classify the EEG signals for the next process. The enhanced GA with mutation pool is suggested in this research work to pick the most feasible and compact function subset. The conditional shared knowledge measure is used to look for function subsets. Per dataset is first fed into the stochastic search based feature selection algorithm, which produces a subset of features that are evaluated before the non-dominated feature subset is chosen after convergence.

SVM Machine Learning for Classification
Optimum classification is done using SVM technique to experiment the wavelet coefficient by passing the multi class signals. Support Vector Machine is a new supervised pattern detection technique that has been widely extended to a wide variety of pattern recognition problems. A teaching algorithm for learning classification and regression rules from data is the support vector machine. SVM is well suited for dealing with high-dimensionality function spaces with precision and efficiency. The RBF kernel is used for the implementation of the SVM model in order to provide minimum parameter adjustments. The kernel function maps input data to a high-dimensional space and uses squared Euclidean distance between two numeric vectors to optimally divide the given data into their respective attack groups. Following Feature extraction, ELM is used to execute the classification task. With the initiation work g, given a set of N training instances and 2L signals (that is, one of the two covered layers has L covered neurons) (x). First, figure the weight matrix between the info layer and the first concealed layer W, as well as the inclination matrix of the first hidden layer B, and then figure the weight matrix between the second hidden layer and the outcome layer to derive the EEG signals using DWT.

Early Prediction of ES
After the signal optimization the system were able to predict epileptic seizures on average before the onset of a seizure after applying the proposed model to the dataset. As a result, with the aid of our proposed model, epilepsy patients will have more time to receive the right treatment they need to avoid seizures before they happen. Based on the dataset, the overall prediction period was found to be 96 percent comparatively very high than the previous works. On the multiple channels EEG single, a basic averaging filter is added to transform it into the surrogate channel for early noise removal. To create a single-channel EEG signal, this filter takes the average of all channels. Although the surrogate channel obtained after applying this filter has more signals, it is more difficult to characterize and optimize by the system. The EPES attained is used using the following equation, which is the following: where, the term MP denotes the most prediction state and hyper state of the corresponding gene value. The closest prediction part is calculated to determine the signals transformation is shown in equation 4.

ES Zone detection during the process
Identify and remove non-functional signals from the system with algorithms that allow data to be compressed locally to extract the similarity and dissimilarity in different reading captures. Simultaneous propagation of signals collected by electrodes with good and high resolution is considered as optimum signal to calculate the TP and TN rate. Sometimes due to poor signal transmission process and low frequency the accuracy level and detection of epileptic zone becomes difficult, in that case the classification helps the signals to reach the level completely and marks the pattern. The HF and LF oscillations are calculated during the signal transformation. Suitable electrodes portion is selected and optimized to maximize the seizure detection. In some critical cases accurate identification is done for epileptic surgery tasks. The functional and non functional signals connectivity is identified with the help of frequency setting level. The frequency S-Level is denoted by the below equation, Where, the frequency is chosen and the system delivers the substantial instances ready to ensure that the signals are prepared from the source. The signals Level are transformed and ready for optimization. However, the States S1 and S2 would not consider remaining resources for the transmission phase to meet the energy usage of the whole prediction system. https://www.indjst.org/

Classification of ESPI states
The signal pattern may divulge imperative facts about brain task. By visually detecting EEG patterns, well experienced doctors may diagnose disorders. However, due to the high spatial dimensions of the complex non-linear EEG data, time conservation is the major scenario during the classification of ESPI states. As a result, advanced computerized methods, as well as the extraction and interpretation of EEG signal parameters, can be extremely useful in diagnostics of ES at early stage. Some specific tasks can be performed during the classifications like identification of double f-level and generic syndromes of ES. Class 1 and Class 2 sets are identified for further extraction and the results are obtained to measure the level of performance. The levels of states are as follows, • S 1 S n state -to identify the sets in prediction stage • Eliminate the early signal transformation • Derive the process of finite signals for early prediction • Select the appropriate level of progress • Measure the performance

About MATLAB Implementation Process
The proposed research work against baseline algorithms is tested in the Matlab R2020a tool. Matlab is the most trusted tool for business and enterprise analysis, text mining, medical image mining, raw data formulation and most algorithms for machine and deep learning. It is used in many IT and engineering applications, hospitals, research due to its user-friendliness. In general, Matlab has been developed to provide enormous integrated and inbuilt math functions to solve scientific-oriented problems. Most of the time, iteration based problems are dealt with in Matlab.

Performance Analysis Measures
The following performance measures are used in this analysis to compare the performance of the proposed algorithm VSPO-SVM to the existing schemes FCM-MPSO (3), EDMLC (6) and K-MODE (11) which were chosen as the baseline schemes in the previous chapter.

Results and Discussions
This chapter describes about the results obtained by the novel algorithm VSPO-SVM against FCM-MPSO (3), EDMLC (6) and K-MODE (11). In terms of optimizing EEG signals, early stage seizure estimation, feature extraction, and prediction accuracy rating, VSPO-SVM outperforms the other schemes. Figures 1, 2, 3, 4 and 5 indicates the X axis plotted with efficiency metrics and the Y axis plotted with final values and percentage of performances. Figure 1 compares the sensitivity and specificity performance analysis of VSPO-SVM against FCM-MPSO (3), EDMLC (6) and K-MODE (11). It is noted that VSPO-SVM gives the remarkable performance with enhanced results. The process of linear function is took place in FCM-MPSO and KMODE so that the performance is less comparing to VSPO-SVM. Due to substantial classification and extraction the proposed algorithm works well in terms of predicting the ES in early stage.

Sensitivity and Specificity Performance Analysis
https://www.indjst.org/  Figure 2 showcased the performance analysis of accuracy level and F-Score of the proposed VSPO-SVM against FCM-MPSO (3), EDMLC (6) and K-MODE (11). The VSPO-SVM can be observed by rigorous use of genetic algorithms and ML principles for extraction and classification of features. According to certain hidden state values, the VSPO-SVM performs where the optimization of signals and output are missing from other systems.   (6) and K-MODE (11) . The VSPO-SVM performs better than the baseline algorithms on the selected datasets. Due to sequential manner and phenomenal extraction and classification the VSPO-SVM states high in prediction and optimizing the EEG signals.  Figure 4 reveals the concrete analysis of False Positive and False Negative of the proposed VSPO-SVM against FCM-MPSO (3), EDMLC (6) and K-MODE (11) . On the chosen datasets, the VSPO-SVM outperforms the baseline algorithms. The VSPO-SVM performs well in prediction and optimization of EEG signals due to its centralized model and remarkable extraction and classification.  Figure 5 shows the analysis of precision and recall of the proposed VSPO-SVM against FCM-MPSO (3), EDMLC (6) and K-MODE (11) . VSPO-SVM emphasizes the expected output over the existing baseline scheme of data processing and classification algorithms, outperforming it. Because of the dimensional frequency state signals flows in the transmission process, the VSPO-SVM performs well where other schemes fail to perform in robust manner.

Conclusion
The research study proposed a new Optimizing and Classification scheme to predict Epileptic Seizure in early stage, namely VSPO-SVM to improve the accuracy level of the system. The proposed work uses EEG database for processing is extracted from Andrzejak R G and Genetic algorithm (GA) is implemented to select the set of feature values with Support vector machine (SVM) on EEG signal processing for training of the system. The trained and test values are compared to the available datasets to make a prediction. Several iterations are carried out. The results show that the VSPO-SVM forecast is more accurate and quicker than the other prediction model, and that it successfully optimized EEG signals. Automated devices are more accurate for predicting a given EEG signal, and they also assist in determining if the signal is seizure or seizure-free without the assistance of a neurologist. For the neurologist, it is also a time-saving and user-friendly application. The limitations of this study are the proposed work is only based on pre defined set of features where the prediction and accuracy level might change case by case. In future the algorithm can be enhanced to predict missed seizure rates and making the system more flexible based on the patient's stability.