Comparison of Svm and Ann for Classification of Eye Events in Eeg

JBiSE). ABSTRACT The eye events (eye blink, eyes close and eyes open) are usually considered as biological artifacts in the electroencephalographic (EEG) signal. One can control his or her eye blink by proper training and hence can be used as a control signal in Brain Computer Interface (BCI) applications. Support vector machines (SVM) in recent years proved to be the best classification tool. A comparison of SVM with the Artificial Neural Network (ANN) always provides fruitful results. A one-against-all SVM and a multi-layer ANN is trained to detect the eye events. A comparison of both is made in this paper.


INTRODUCTION
The electroencephalogram, or EEG, consists of the electrical activity of relatively large neuronal populations that can be recorded from the scalp.In healthy adults, the amplitudes and frequencies of such signals change from one state of a human to another, such as wakefulness and sleep.The characteristics of the waves also change with age.There are five major brain waves distinguished by their different frequency ranges.These frequency bands from low to high frequencies respectively are called delta (δ), theta (θ), alpha (α), beta (β), and gamma (γ).
The main artifacts in EEG can be divided into patient-related (physiological) and system artifacts.The patient-related or internal artifacts are body movement-related, EMG, ECG (and pulsation), EOG, ballistocardiogram and sweating.The system artifacts are 50/60 Hz power supply interference, impedance fluctuations, cable defects, electrical noise from the electronic components and unbalanced impedances of the electrodes.
Eye events (eye blink, eyes close and eyes open) are normally considered as physiological artifacts in the EEG.But if we consider in a BCI point of view, these signals, although artifacts, can be used as good control signals.Eye blink signals can be used in BCI applications like virtual keyboard while the eye close and eyes open signals can be used for folding and opening electric foldable hospital beds.
SVMs (Support Vector Machines) are a useful technique for data classification.The foundations of Support Vector Machines have been developed by Vapnik (1995) and are gaining popularity due to many attractive features, and promising empirical performance.The SVM belongs to a class of machine learning algorithms that are based on linear classifiers and the "kernel trick".The aim of Support Vector classification is to devise a computationally efficient way of learning 'good' separating hyperplanes in a high dimensional feature space, where 'good' hyperplanes are ones optimizing the generalization bounds, and 'computationally efficient' mean algorithms able to deal with sample sizes of the order of 100000 instances [8].

EYE EVENT CHARACTERISTICS
The eye event signals includes: eye blink, eyes close and eyes open.Eye blinks are typically characterized by peaks with relatively strong voltages.There is also certain variability in the amplitude of the peaks of a specific individual, more variability between different subjects.Eye blinks can be classified as short blinks if the duration of blink is less than 200 ms or long blinks if it is greater or equal to 200 ms.
Eye blinks can be classified into three types: reflexive, voluntary and spontaneous.The eye blink reflexive is the simplest response and does not require the involvement of cortical structures.In contrast, voluntary eye blinking (i.e.purposely blinking due to predetermined condition) involves multiple areas of the cerebral cortex as well as basal ganglion, brain stem and cerebella structures.Spontaneous eye blinks are those with no external stimuli specified and they are associated with the psycho-physiological state of the person.

Amplitude
The eye related signals will be predominant in the frontal and prefrontal regions of the brain.In the prefrontal lobe, say FP1-F3 or FP2-F4 electrode pairs, a downward peak in the negative region shows an eyes open event and a positive peak shows an eyes close event.Also the amplitude of these peaks will be significantly higher compared to the rhythmic brain activity.An eye-blink signal can be detected by its positive and negative peak occurrences occurrences as shown in Figure 1.

Kurtosis
The EEG signal is stochastic, and each set of samples is called realizations or sample functions (x(t)).The expectance (µ) is the mean of the realizations and is called first-order central momentum.The second-order central momentum is the variance of the realizations.The square root of the variance is the standard deviation (σ), which measures the spread or dispersion around the mean of the realizations [5].
The kurtosis, also called fourth-order central momentum, characterizes the relative flatness or peakedness of the signal distribution [5], and is defined in (1), which was modified to refer to a non-Gaussian distribution.

 
The kurtosis coefficient of an event is significantly high when there is an eyes-open, eyes-close or an eye blink.The other spurious signals generated by patient movement, event like switching ON/OFF a plug etc have a small value for kurtosis coefficient.Hence eye events can be detected by kurtosis coefficient.

ARTIFICIAL NEURAL NETWORK
Artificial Neural Networks (ANN) is simplified models of the biological nervous system and therefore has drawn their motivation from the kind of computing performed by a human brain.An ANN, in general, is a highly interconnected network of a large number of processing elements called neurons in an architecture inspired by the brain.Neural networks learn by examples.They can therefore be trained with known examples of a problem to 'acquire' knowledge about it.Once appropriately trained, the network can be put to effective use of solving 'unknown' or 'untrained' instances of the problem.
Multilayer feed-forward network architecture is made The optimal hyperplane not only correctly separates th (3) layers and an output layer.Neurons are the computing elements in each layer as in Figure 2. The acceleration or retardation of the input signals is modeled by the weights.The weighted sum of the inputs to each neuron is passed through an activation function to get the output of a neuron.In addition to the inputs there are also biases to each neuron.

SUPPORT
where i x is the training sample eigenvector, x is the recognizing sample eigenvector, is called kernel function.Kernel functions provide a convenient method to obtain the high-dimension features mapped from the data without computing the non-linear transformation [10].The common kernel functions are linear, quadratic, polynomial and radial basis function (rbf) kernels (Table 1).
The Support Vector Machine implements the fo idea: It maps the input vectors x into the high-dimensional feature space Z through some nonlinear mapping, chosen a priori.In this space, an optimal separating hyperplane is constructed [9].SVM method is based on the principle of VC dimension from the statistical learning and the Structural Risk Minimization (SRM).
For non-linear classification, a non-linea The support vector machine is a powerful tool for binary classification, capable of generating very fast classifier functions following a training period.There are several approaches to adopting SVMs to classification problems with three or more classes: Multiclass ranking SVMs, in which one SVM decision function attempts to classify all classes.One-against-all classification, in which there is one binary SVM for each class to separate members of that class from members of other classes.Pair-wise classification, in which there is one binary SVM for each pair of classes to separate members of one class from members of the other.The one-against-all classification is used in this paper.The architecture of SVM is shown in Figure 3. mension feature space, which constructs an optimal classifier e two class data points, but also makes the margin (distance of the closest point to the hyperplane) maximal.By applying the Lagrange Transformation, the optimal classifier function is derived,

SIGNAL ACQUISITION AND PROCESSING
EEG signal is acqui The Biopac disposable vinyl electrodes (EL 503) are placed on the FP1 and F3 region in the 10-20 International electrode system.The reference electrode is placed on the earlobe.The lead set SS2L connects the electrode to the Channel 1 (CH-1) of the MP36 system which is further connected to the computer via USB port as shown in Figure 4 and Figure 5.
The CH-1 of the Biopac MP36 lectroencephalogram (EEG), 0.5-35 Hz' mode.In this mode the gain of the amplifier is 25000.Two hardware filters, a 0.5 Hz high pass filter and a 1 kHz low pass filter, are used in this configuration.Also a digital low pass filter having 66.5 Hz cut-off and a 0.5 Q ratio is employed.This ensures the noise free picking up of EEG signals from the scalp electrodes.The sampling frequency is set at 200 samples per second.
In MATLAB the EEG data is divided e windows (5s).The kurtosis coefficient, maximum amplitude and minimum amplitude of each window sample are taken out.The eye blink signals are characterized by high value of kurtosis coefficient, normally above the value 3. The data is arranged in excel files as kurtosis coefficient, maximum amplitude and minimum amplitude.These are considered as inputs to the neural network.With the help of the event markers, early recorded, an output set is defined corresponding to each sample window.

Kernel Function Equa
Linear   , exp    loss of generalization.The testing of ANN is done by simulating the ANN with the testing set and then calculating the error.With standard steepest descent, the learning rate is held constant throughout training.The performance of the algorithm is very sensitive to the proper setting of the learning rate.If the learning rate is set too high, the algorithm can oscillate and become unstable.If the learning rate is too small, the algorithm takes too long to converge.It is not practical to determine the optimal setting for the learning rate before training, and, in fact, the optimal learning rate changes during the training process, as the algorithm moves across the performance surface.The 'trainlm' is a network training function that updates weight and bias values according to Levenberg-Marquardt optimization.The 'trainlm' is often the astest backpropagation algorithm in the neural networ oolbox, and is highly recommended as a first-choice supervised algorithm, although it does require more memory than other algorithms.
The training of SVM is done by using the svmtrain function in the MATLAB Bioinformatics toolbox.During training we can specify the kernel function to be used.Also many other parameters can be varied in the process of training.After training the function returns a structure having the details of the SVM, like the number of support vectors, alpha, bias etc.The data can be classified using the svmclassify function.Three SVMs are trained in one-against-all mode for eye blink, eyes close and eyes open detection.

RESULTS AND DISCUSSIONS
A multiclass one-against-all SVM and a Feed Forward Back Propagation (FFBP) ANN are trained to classif rained in just 23 seconds using the ean Square Error, MSE) of about 10-8 at ep r network configurations te tic, polynomial and radial basis In a multifunction for ile the ANN had got only 86.8% as sh f t k y the eye events: eye blink, eyes close and eyes open.The FFBP network is t trainlm algorithm and is faster than ANNs that uses other training algorithms.The network had obtained a good performance (M och 14 with the best validation performance of 0.02566 at epoch 8.The network with two hidden layers (3:30:15:3) proved to be better on the basis of classification accuracy compared to othe On the other hand, the SVM classifiers are trained in a fraction of a second with much better classification accuracies.The individual SVMs are trained with different kernel functions and their classification accuracies are calculated.Linear, quadra function (rbf) kernels are used for training.class one-against-all strategy, a single kernel all the SVMs had not provided exciting results.So individual SVMs are trained with different kernel functions and the ones with the maximum classification accuracies are selected.For detecting the eye blinks from the other classes, the quadratic kernel SVM had got the maximum classification accuracy (91.9%).For the eyes close detection also the quadratic kernel SVM had got the best classification accuracy (86.5%).But for the eyes open detection, linear kernel classifier had got the maximum classifier accuracy (94.0%).The rbf kernel SVM had also proved to be good classifiers for eye event detection.The performance of ANN and SVM is shown in Figure 7 and Figure 8 respectively.
So when the results of the SVMs and ANNs are compared the SVMs had got an overall classification accuracy of 90.8% wh own in Table 3 and Table 4.This proves the superior performance of the SVM classifiers over the ANN classifiers for eye event detection in EEG.2008, 1931-1934.

Figure 1 .
Figure 1.Eye event signal, (a) Eye blink signal, (b) Eyes close signal and (c) Eyes open signal.

Figure 3 .
Figure 3. Architecture of SVM (N is the number of support vectors).

Figure 4 .
Figure 4. Block diagram of data acquisition system.

Figure 5 .Figure 6 .
Figure 5. Subject performing eye events according to the instructions.

Figure 8 .
Figure 8. Performance of SVM for eye blink, eye close and eye open detection.

Figure 7 .
Figure 7. Performance of ANN for eye blink, eye close and eye open detection.

Table 1 .
Kernel Functions used with SVMs.

Table 3 .
Comparison of various kernel functions.
This contribution presented a new application of the SVM and ANN classifier to detect the eye events, the eye blink, the eyes close and the eyes open, in the EEG signal.Kurtosis coefficient, maximum amplitude and