EEG Signal Processing for Epileptic Seizure Prediction by Using MLPNN and SVM Classifiers

: Electroencephalogram (EEG) comprises valuable details related to the different physiological state of the brain. In this paper, a framework is offered for detecting the epileptic seizures from EEG data recorded from normal subjects and epileptic patients. This framework is based on a discrete wavelet transform (DWT) analysis of EEG signals using linear and nonlinear classifiers. The performance of the different combinations of two-class epilepsy detection is studied using Support Vector Machine (SVM) and neural network analysis (NNA) classifiers for the derived statistical features from DWT. In this new approach first parse EEG signals to sub-bands in different categories with the help of discrete wavelet transform (DWT) and then we derive statistical features such as Mean, Median, Standard Deviation, Kurtosis, Entropy, Skewness for each sub-band. These features, extracted from details and approximation coefficients of DWT sub-bands, are used as input to Principal Component Analysis (PCA). The classification is based on reducing the feature dimension using PCA and deriving the Support Vector Machine (SVM) and neural network analysis (NNA). In classification of normal and epileptic, results obtained exhibited an accuracy of 100% by applying NNA and 99% by SVM it has been found that the computation time of NNA classifier is lesser than SVM to provide 100


Introduction
Epilepsy is a chronic neurological brain disorder Characterized by abnormal brain electrical activity which affects about one percent of world population [1]. Epilepsy is a complicated problem due to overlapping symptomatology with other neurological disorders. Epilepsy is one of the most Common neurological disorders that greatly impair patient daily lives. The most common way for epilepsy diagnosis is through analysis of EEG. It still remains the main diagnostic modality for absence seizures, even if it is often combined with MRI mostly to rule out false diagnosis related to brain tumour or stroke. Electroencephalography (EEG) is an effective non-invasive tool for understanding the complex dynamical behaviour of the brain and for monitoring different physiological states of the brain, neurological disorders. Scalp EEG has been employed as a clinical tool for the analysis and healing of brain disease [2]. During epilepsy, less number of independent functions and processes are active in the brain. Epileptic seizures can be clearly distinguished from non-epileptic ones by observing the EEG recordings as non epileptic seizures have normal EEG readings [3]. Traditional epileptic diagnosis relies on tedious visual screening by neurologists from lengthy EEG recording that requires the presence of seizure activities. Usually, confirmation of the diagnosis involves a combination of the medical history of the patient and EEG interpretation by any expert neurologist [4]. The development of accurate and reliable EEG-based automated tools is still in its infancy.
Many automated system for accurate and timely diagnosis of epilepsy have emerged [5][6][7]. Nevertheless, with the advent of new signal processing techniques, there has been an increased interest in the analysis of the EEG for prediction of epileptic seizures. These algorithms can detect abnormal disorder and malfunctioning of the brain not only during the seizure but also can detect the onset of seizure up to some extent. An automatic seizure detection system is used in the diagnosis of epilepsy, which act as an additional tool apart from visual inspection of EEG by the physician [8].

Material and Method
In an automatic epileptic convulsion detection system, a distinction should be made between the pre-convulsion, during convulsion, and post-convulsion EEG signals. Then, they should be analyzed [7]. Some studies focused on singlechannel EEG signals, while some others focused on multichannel recorded EEG signals [8]. This paper studied the epileptic and healthy signals of R. G. Andrzejak database from the University of Bonn [9]. The data relate to three different categories: normal situation of the patient, preseizure and seizure. The collected EEG signals include 5 categories which, respectively, are called (A, B, C, D, E). Each of these categories includes 100 single-channel signals with a length of 26.3 seconds.
Category A: Surface EEG signal recorded from 5 healthy volunteers in a relaxed awake state with eyes open.
Category B: EEG signal recorded from 5 healthy volunteers in a relaxed state with eyes closed.
Category C: Deep signals recorded from epileptic patients during the interval between seizures from inside the area that caused the seizure. (focal signals) Category D: Deep recorded signals from epileptic patients during the intervals between seizures from outside the area that caused the seizure. (non-focal signals) Category E: Signals recorded from epileptic seizures. All EEG signals were recorded with the 128-channel system with common average voltage. Sampling frequency in this database is 173.61 Hz. According to the Nyquist Theorem, the maximum useful sampling frequency is half of the sampling frequency. Here we have: . 86. 6 (1) Where is the sampling frequency. The placement design of surface electrodes is related to the 20-10 global system, is shown in Fig. 1. Therefore, the electrodes were named as follows [10]:   The frontal lobe, temporal lobe, parietal lobe, central lobe, and occipital lobe were named F, T, P, C, and O, respectively [11]. The Figure 2 describes the anatomy of the brain with different regions [12].

Wavelet Transform for Signal Analysis
Wavelet transform technique is used to decompose the signals and reconstruct the data accurately. rippling remodel technique could be a appropriate analytical tool for the Non Stationary signals analysis like encephalogram and it had been projected by Jean Morlet a French geologist in 1982 [2] It involves the breaking down of the brain signals into numerous shorter reads of bands as per demand. In distinct wavelet analysis, a multi-resolution description is employed to decompose a given signal f(t) into progressively finer details supported 2 sets of basic functions [13] the wavelets and the scaling functions, as follows: Where functions. φ t and ψ(t)are the basic scaling and mother wavelet respectively. Five sub-bands are obtained, namely Delta (0-4.05 Hz), Theta (4.05-8.1Hz), Alpha (8.1-12.15 Hz), Beta (12.15-32.5 Hz) and Gamma (>32.5 Hz) [14].

Figure 3. Sub-band decomposition of DWT implementation; h[n] is the highpass filter, g[n] the low-pass filter.
The number of decomposition levels is chosen supported the dominant frequency parts of the signal. The amount square measure chosen such those components of the signal that correlates well with the frequencies necessary for classification of the signal square measure maintained within the riffle coefficients. Within the present study, since the encephalogram signals don't have any helpful frequency parts higher than 30 cycles/second, the amount of decomposition levels was chosen to be four. Thus, the encephalogram signals were rotten into details D1-D4 and one final approximation, A4. Usually, tests square measure performed with differing kinds of wavelets and also the one, which supplies most potency, is chosen for the actual application. The smoothing feature of the Daubechies riffle of order a pair of (db2) created it additional applicable to sight changes of encephalogram signals. Hence, the riffle coefficients were computed victimization the db4 within the present study. The projected methodology was applied on each knowledge set of encephalogram knowledge (Sets A and E).

Feature Extraction
In this framework have chosen the statistical parameters All the extracted features constitute the combined feature index (CFI) = (F1, F2, F3, F4, F5...... Fn), which is presented as an input to the ANN network. The features used in evaluating the performance of the proposed scheme are mean, standard deviation, median, entropy, kurtosis and skewness were calculated at each decomposition level starting from 01 to 04 for the normal and epilepsy categories of signals. The mathematical equations are represented as follows: Mean µ Mean are fundamental statistical attributes of a time series the arithmetic mean of a time series is the average expected value of that time series. In some cases, the mean value of a time series can be the operating point or working point of a physical system that generates the time series

Standard Deviation 0
The standard deviation is similar to the average deviation except the averaging is done with power instead of amplitude. This is achieved by suaring each of the deviation before taking the average. To finish the square root is taken to compensate for the intial squaring. In equation from the standard deviation is calculation: i =1, 2, 3, 4.......... X is signal with mean (, N is the number of sample and 0 is standard deviation.

Kurtosis k
The kurtosis are higher-order statistical attributes of a time series. Kurtosis measures the peakedness of the probability density function (PDF) of a time series. A kurtosis value close to three indicates a Gaussian-like peakedness. PDFs with relatively sharp peaks have kurtosis greater than three. PDFs with relatively flat peaks have kurtosis less than three.  Where ( is the mean of signal x, 0is the standard deviation of x, and E(t) represented the expected value of the quantity t Skewness computes a sample version of this population value.
Entropy E Entropy is a numerical measure of the randomness of a signal. Entropy can act asa feature and used to analyze psychological time series data such as EEG data. The Entropy can thus be calculated as: ; < ∑ ; < + + i =1, 2, 3, 4.......... The E must be the an additive cost function such that E(0) = 0. Entropy is the statistical descriptor of the variability within the EEG signal and is a strong feature for epilepsy detection.

Median M
The median is a simple measure of central tendency. To find the median, we arrange the observations in order from smallest to largest value. If there is an odd number of observations, the median is the middle value. If there is an even number of observations, the median is the average of the two middle values , = ∑ > ?
i =1, 2, 3, 4.......... X refers to the entire set of the numbers. Median are more robust than arithmetic mean and geometric mean if the raw data does not contain significant outliers.

Classification
The applied mathematics options derived from DWT are applied to the classifiers. The main aim of the classifier is to spot, the brain disorder abnormality in EEG data by linear/non-linear mathematical approach. In proposed work, the classifiers used are Neural Network Analysis and knearest neighbour, to spot epileptic seizure EEG data for the individual and combined the applied mathematics options derived from DWT with a special combination of data sets A with E. The performance of NNA and SVM classifiers is assessed with accuracy, sensitivity and specificity for the derived DWT based mostly applied mathematics options to detection the seizure abnormality. Using 30 parameters 80 non-epileptics and 80 epileptic for NNA, 100 non-epileptics and 100 epileptic for SVM cases taken from database described before are analyzed.
Classification using NNA The performance of NNA classifiers is assessed with accuracy, sensitivity and specificity to detection the epileptic seizure abnormality. This task was performed using MATLAB 2015a. In this work Neural network pattern recognition was used for evaluating different states of EEG signals, such as healthy and epileptic states. Structure of Multilayer preceptorn shown in figure. 5. In this work the dataset which is used from these data 75% data from set A and 75% data from set E is used for Training. For testing purpose 25% data is used. This selected data is used as input to the MLPNN Classifier which is used in this work.
The number of neurons in the input layer symbolizes the number of features presented to the network, followed by hidden layer with neurons which transforms the input into nonlinear combinations and passes the signals to the output layer (15). In our study, the number of neurons in the input layer is ten corresponding to CFI and the number of neurons in the output layer is three to classify three different classes. The most difficult task is to pick the amount of neurons in hidden layer. In this framework a tendency to varied the numbers of hidden nodes to seek out out the design giving the higher performance with high accuracy. The framework technique by consistently enumerating all combinations of feature vectors and checking all completely different size CFIs for the optimality of the options.
Classification using SVM The idea of SVM is originated from the idea of controlling the generalizing capabilities of machines for automation. The performance of a classifier must be generalized, i.e. it should perform well when it is applied for the data outside the training set. The notion of maximizing the margin between the support vectors is at the heart of the SVM classifier, in order to perform more accurately on unknown data [16,17] Consider the hyperplane in (9): The margin is the Euclidian distance 1 / ||w|| between the two parallel hyper-planes (support vectors) described in (10): Let 2 + are training points, with respective classes K + ∈{-1, 1}, i=1, 2,…., N for a 2 class classification problem. The task is to optimize for minimum training error and maximum separating margin between hyper-planes of (10). SVM classifier solves this task by solving the optimization problem of (11): Subjected D E 2 -D $ ≥ 1 N + , if K + ∈ 1 And D E 2 -D $ ≤ 1 -N + , if K + ∈ 1 And N + ≥ 0 For the present work, involving two class classification (Epileptic seizure or not), firstly learn the classifier equation (similar to (8)) by solving the optimization problem of (10) with constrains of (11), using half of the feature vectors from Matrixes training data. It is found that the entropy and kurtosis from all the five sub-bands are optimum for classification of EEG signals and it gives high performance accuracy.

Experimental Result
In this process classification is done for ictal state (E) and other healthy state (A) and in order to measure the performance of the classifier, Sensitivity (TPR) and Specificity (TNR) were calculated and further total Accuracy will calculated with the help of all above.

Sensitivity (TPR)
The sensitivity of a take a look at is its ability to see the patient cases properly. To estimate it, we should always calculate the proportion of true positive in patient cases [18].

Specificity (TNR)
The specificity of a test is its ability to determine the healthy cases correctly. To estimate it, we should calculate the proportion of true negative in healthy cases [18].

Accuracy
The accuracy of a check is its ability to differentiate the patient and healthy cases properly. To estimate the accuracy of a check, we must always calculate the proportion of true positive and true negative all together evaluated cases [18]. Equation

Conclusion
An expert model was developed for detection of epilepsy on the background of EEG by using discrete wavelet transform and SVM and MLPNN classifiers. The feature like Mean, median, entropy, standard deviation, kurtosis, skewness was extracted from the EEG signal. The results have been shown that the proposed technique could attain a higher accuracy using SVM and MLPNN both the classifier for normal eyes open and epileptic seizure EEG data sets for all individual and combined statistical features derived from DWT for the detection of an epileptic seizure. The study of the proposed technique is evident from the other pattern recognition approaches considered by the researchers for different combination of data set A and D and we confirm that the NNA classifier achieves high accuracy with less computation time compare to SVM.