Electroencephalogram (EEG), its Processing and Feature Extraction

-This paper deals with the basics about electroencephalogram, its processing and feature extractions. Prominently used extraction methods such as Principal Component Analysis, Independent Component Analysis, Time-Frequency Analysis, Wavelet Transform have been discussed here along with mathematical representations. Software tools and their use towards EEG are highlighted.

INTRODUCTION An Electroencephalogram (EEG) is a medical routine that detects abnormalities in the brain waves, or in the electrical activity of the brain. During the test, electrodes are pasted onto the scalp of the patient. These electrodes are tiny metal discs with thin wires connected to the acquisition system and they detect tiny electrical charges that result from the activity of the brain cells. This is then amplified and appears as a graph on the computer screen, or as a hardcopy recording. The doctor/technician then interprets the reading. [1] The EEG test is performed by an electroencephalogram technologist. It is done in the following way: [2] • You lie on your back on a bed or in a reclining chair.
• Flat metal disks called electrodes are placed all over your scalp. The disks are held in place with a sticky paste. The wires protruding out of them connect to the acquisition system. This system coverts the recording/signals into EEG patterns that can be viewed on screen or printed onto a sheet of paper. These patterns look like wavy lines.
• You need to lie still during the test with your eyes closed. This is because movement can change the results. You may be asked to do certain things during the test, such as breathe fast and deeply for several minutes or look at a bright flashing light.
• You may be asked to sleep during the test.
Depending on the kind of activity and hence the frequency range it falls in, the EEG wave can be classified into beta, alpha, theta, delta and gamma waves. Their frequency ranges are as follows: [3]  PROCESSING AND FEATURE EXTRACTION OF EEG EEG signal processing involves the following stages: [3] Figure 1: EEG signal processing stages [3] The feature extraction methods of EEG are as follows: [5] 1. Principal Component Analysis 2. Independent Component Analysis 3. Time-Frequency Analysis 4. Wavelet Transforms

A. Principal Component Analysis:
Principal Component Analysis (PCA) is a wellestablished method for feature extraction and dimensionality reduction. In PCA, we try to represent the d-dimensional data in a lower-dimensional space. Such a representation would reduce the degrees of freedom and the space and time complexities. [5] The objective is to represent data in a space that best expresses the variation in a sum-squared error sense. To segregate signals coming from various sources, this technique provides to be useful. It facilitates significantly if we know how many independent components exist ahead of time, as with standard clustering methods. [5] A standard PCA when used as a data analysis tool involves a dataset of p number of observations for n number of entities or individuals. These data values define p ndimensional vectors x1, . . ., xp or, equivalently, an n × p data matrix X, whose jth column is the vector xj of observations on the jth variable. [6] Linear combinations are given by where is a vector of constants a1, a2, . . ., ap [6] Performance of PCA helps in minimizing the data and time required for computation. It reduces the dimension of the EEG data. [7] B. Independent Component Analysis: Independent Component Analysis (ICA) is another feature extraction method. This is used to convert random signals with multiple variables into one with mutually independent components. Individual and independent components can be extracted from mixed signals by using ICA. In this manner, independence denotes the information carried by one component cannot be inferred from the others. [5] Statistically this means that joint probability of independent quantities is obtained as the product of the probability of each of them. [5] The ICA finds the unmixing matrix (W) and then projects the whitened data onto that matrix for extracting independent signals. [8] Mathematically, Let Σ = Cov(X) and let X = AS, B = A -1 Then, for some non-singular W Then, S = BX = WΣ -1/2 X with Cov(S) = I and W are orthonormal. [9] Therefore, operationally, ̃ = Σ -1/2 X data is sphered and then seek an orthogonal matrix W so that the components S = W̃ are independent. [9] Independent Component Analysis helps in segregating the brain and non-brain components from the acquired EEG signal. [7] C. Time-Frequency Analysis: The time-frequency representations, which map a onedimensional signal into a two-dimensional function of time and frequency, can be divided into two main classes: linear and nonlinear time-frequency representations. [10] The linear methods include the short-time Fourier transform (STFT) and wavelet transform (WT). The nonlinear methods include the Wigner-Ville distribution (WVD), the exponential distribution (ED), and the reduced interference distribution (RID). [10] For a function , its Fourier Transform is given by, where ( ) is the time-domain or temporal behaviour and ̂ is the frequency behavior [11] Time-frequency analysis involves the analysis of the intermediate signals that combine data of both and ̂. It is given by, V ( , ) where, it measures the strength of frequency at time . [11] They provide the right visualization of the EEG waves so as get the various frequency wave bands. [12] D. Wavelet Transforms: It is a mathematical transform that gives the timefrequency representation of the signal. It is an alternative to the short time Fourier Transform (STFT). [13] Most of the feature extraction techniques for classification of EEG waves include wavelet transforms. It is usually used in the pre-processing stage. [14] An individual wavelet can be defined by, [15] , ( ) = | | −1/2 ( − ) Then, And Calderón's formula gives, where [16] , ( ) = | | −1/2 ( − ) A common type of wavelet is defined using Haar functions. [15] This transform is used for correct analysis of EEG. It could be seizure analysis, neuron potential modelling, etc. [12] VI.
FEATURE EXTRACTORS A. Mean: [17] The ratio of summation of all the values of the signal and the total size of the signal is called the Mean of the signal. It is denoted by, where is the mean of the signal and {x1, . . .., xn} are the values of the signal.
Calculation of Mean help in analysing the weights of various sets of samples of the EEG data.
B. Variance: [18] Mathematically, variance is a measure of statistical dispersion of a random variable. It is given by, where µ is the mean of the signal Figure 2: Analysis of Variance [18] The figure above is a plot of the variance values of normal and seizure affected individuals. The plot shows that there is significant variation between both these set of values.
The variance helps in comparing the different dispersions of the various sets of the EEG data samples from their means. [17] C. Standard Deviation: [18] The measure of dispersion of a set of data from its mean is called standard deviation. It is given by, where µ is the mean of the signal Figure 3: Analysis of Standard Deviation [18] The figure above is a plot of the standard deviation values of normal and seizure affected individuals. The plot here shows that the standard deviations of the set of values have significant difference from one another.
The standard deviation also helps in comparison between the different dispersions of the various sets of the EEG data samples from their means. [17] D. Skewness: [18] The lack of symmetry is measured by the skewness. It is given by, where µ is the mean of the signal and is the standard deviation of the signal.
The value of skewness gives an interpretation on which side of the mean point the data set is distributed.
E. Power: [17] The measure of amplitude of EEG signal is given by power of the signal. It is denoted by, Where X is the values of the signal and L(X) is the length of the signal. SOFTWARE TOOLS The software tools usually used for signal processing include MATLAB, Octave and SciPy. Of these, MATLAB has always been used as a promising tool for the processing. [19] MATLAB MATLAB is a software that can be used for algorithm implementation, matrix manipulations, display and plotting of various functions and signals, interfacing with other programs in other languages, etc.
EEG can be analysed directly in MATLAB by writing appropriate. But, a more effective and better way of processing EEG data in MATLAB would be using the EEG Lab toolbox. This interactive toolbox enables us to perform various operations on the both continuous and event-related EEG data such as Principal Component Analysis, Independent Component Analysis, 2D plotting of EEG signal, 3D plotting of EEG signal, power spectrum analysis, etc. [22] NeuroView NeuroView is a software that is designed to record and observe real-time EEG data. Other applications that are used to analyse EEG data can import the information from NeuroView. Programs like Excel can be used to view the data recorded by NeuroView as they are stored as CSV (Comma-Separate-Values) files. [23] BCI Companies Brain Computer Interface (BCI) devices are used to send and receive signals between the brain and the external environment. BCI manufacturing companies include, NeuroSky, NeuroVista, EMOTIV, NeuroVigil, Nymi, AliveCor, SHL, FocusBand, Atentiv, BioBeats and Champalimaud Foundation, etc. [24] For usage in biomedical and related equipment for easy acquisition and other worthwhile factors, NeuroSky products are preferred. [25] Their products help analyse biometric data in a very easy and practical way. The solutions provided help to motivate people and make their lifestyles better. [26] ThinkGear NeuroSky uses a dry sensor technology. This is used for the measurements, amplification of EEG signals and brainwaves. These are also used to filter and analyse the brainwaves and EEG signals. This technology is called ThinkGear. This technology helps respond to person's mental activity aptly. [27] This technology is used in a device named Brainsense by Pantech Solutions. This is a single channel wireless headset connected to the system using Bluetooth. The activity of the pre-frontal lobe is measured thus acquiring the subject's prefrontal cortex EEG data accurately. [28] VIII. CONCLUSION EEG is a neurological test that uses an electronic monitoring device to measure and record electrical activity in the brain. It is the key tool in the diagnosis and management of epilepsy and other seizure disorders. [29] Interactive MATLAB tools, NeuroView and other similar software are used for processing continuous and event-related EEG, MEG and electrophysiological data using ICA, PCA and other methods including artifacts rejection.