EEG Sensor Based Classification for Assessing Psychological Stress Shahina BEGUMa,1 and Shaibal BARUA a School of Innovation, Design and Engineering Mälardalen University, SE-72123 Västerås, Sweden a
Abstract. Electroencephalogram (EEG) reflects the brain activity and is widely used in biomedical research. However, analysis of this signal is still a challenging issue. This paper presents a hybrid approach for assessing stress using the EEG signal. It applies Multivariate Multi-scale Entropy Analysis (MMSE) for the data level fusion. Case-based reasoning is used for the classification tasks. Our preliminary result indicates that EEG sensor based classification could be an efficient technique for evaluation of the psychological state of individuals. Thus, the system can be used for personal health monitoring in order to improve users health. Keywords. Sensor fusion, case-based multivariate multi-scale entropy analysis.
reasoning,
electroencephalogram,
Introduction Biomedical signals if processed correctly and efficiently have potential to facilitate advanced monitoring, diagnosis and treatment planning. Electroencephalogram (EEG) records the brain waves using electrodes placed on the brain scalp. EEG signal contains important information about the mental state of the brain. Recording of EEG became popular around 1924. An Austrian psychiatrist Hans Berger made the first record of electrical activities of human brain. During 1930s he recorded EEG for sleep. Today, EEG has been applied in different medical conditions including epilepsy, parkinson’s etc [1]. However, manually it is not possible to extract subtle information from EEG sensor signal. In one study, Anderson et al. [2] distinguish several mental states using EEG signal based on Neural Network. Here, mental state is studied in several conditions i.e., baseline, mental arithmetic, geometric figure rotation, mental letter composing and visual counting. Classification of EEG to determine mental tasks using Neural Network is also presented in [3]; here cluster analysis is performed to determine weight vectors. Analysis of EEG signal has been conducted by the authors in [4] to investigate the effect of music and reflexological stimulation. Correlation Dimension, Largest Lyapunov Exponent, Hurst Exponent and Approximate Entropy have been investigated to distinguish between relax and active state of the mind. In [5] Spectral Centroids and EEG asymmetry were applied to extract features from EEG in identifying stress. Stress which is a complex phenomena plays a vital role in creativity, attention and decision making tasks [6]. The paper describes an approach that applies 1
Shahina Begum: Mälardalen University, SE-72123 Västerås, Sweden,
[email protected].
sensor fusion and Case-based reasoning in assessment of stress diagnosis based on data collected from 2-channel EEG signals.
1. EEG Signal Acquisition and Preprocessing The signal was collected using NeXus-10 Mark II, the device communicates wirelessly in real-time. For electrode placement, the 10-20 EEG system was used. The electrodes were placed at the locations Fp1, Fp2, Cz (ground), A1 and A2 (references). The data were collected from 16 healthy subjects. All participants were informed about the experimental setup see Fig 1. During the experiment, other sensors data were also collected however, in the current research work we are focusing only on the EEG signal. The EEG data were recorded at a sample rate of 256Hz. Then the data were filtered using a 1-45 band pass filter.
Figure 1. Experimental setup.
Data have been recorded in six segments. Segments are as follows: 3 minutes baseline, 2 minutes relaxation, 4 minutes stressful events thinking, 2 minutes happy events thinking, 2 minutes mental arithmetic work and at end 2 minutes relaxation. In the 4 minutes stressful events thinking state, subjects were asked to think about some stressful events in their life and in 2 minutes happy events thinking state to think about some happy and joyful events in their life. In the mental arithmetic work segment subjects were instructed to subtract a value from a given number. Typically EEG signals contain some unwanted data due to interference from electronic equipment (e.g., 50-60 Hz power supply signal), EMG artifacts for muscle activity and artifacts for eye movements or blinking. EEG data without handling these artifacts could mislead the analysis result. To avoid interference from electronic equipment, subjects were asked to take out any electronic devices (i.e. wrist watch, mobile phone) and there was also no other devices accept the data acquisition tools. Ocular artifact is one major problem caused by eye movements or blinking. So during the data collection the subjects were requested not to close their eyes and blink their eyes as less as possible. The data acquisition software uses digital filter data processing and before the data acquisition properties of data channels were configured. The IIR band pass filter with 3rd order was configured as data filter; it provides the artifact rejection from the raw data. The filter rejects the artifacts if EMG artifact’s value was greater than 10 and theta amplitude was greater than 25. One problem with the artifact
rejection is that it reduces the number of data points from the signals. Therefore, Cubic Spline interpolation [7] had been applied to handle artifacts that were rejected by the filter.
2. Methods Entropy and complexity measures have widely been applied for the analysis of time series signals. Entropy is introduced by Shannon [8] for information theory. Entropy can be calculated using Equation (1) H ( X ) = −∑ p(x )log p(x ) (1) n
i =1
i
i
Where, X is the random variable with n outcomes that is X = {x i := 1,2, K , n} and p ( xi ) is the probability mass function of xi . Equation (1) refers to Shannon Entropy. The Multivariate Multi-scale Entropy (MMSE), which is an extension of Multi-scale Entropy (MSE), supports entropy estimation of multivariate/multichannel data. Sample Entropy algorithm introduced by Richman et al. [8] is the basis of the MMSE algorithm. In our proposed system, for the data level fusion, MMSE algorithm is applied to measure complexity. A detailed description of the MMSE algorithm is available in [9][10]. Case-based reasoning (CBR) is a methodology for problem solving and learning [11][12], learning from the past and solving new problems based on previously solved cases is the main approach of CBR. Commonly, a case can be represented as a pair of problem and solution. So, it contains a previous problem and its solution. All the experiences or cases are stored in a case library. Similarity measures between the cases play a vital role in CBR. The main phases of a CBR cycle are [11] retrieve phase: it retrieves cases similar to the problem description. Reuse: it uses the solution of a previous case. However, usually the best matching case does not always provide a complete solution for a new problem case and therefore adaptation of the solution is often required to use it for a new case. This adaptation or change of the best matching cases usually complex and requires domain knowledge. Revise the proposed solution from the reuse step is evaluated and if necessary repaired in the revise step. Retain the confirmed solution is saved into the case library as learned case. 2.1. Sensor-fusion Based Classification
Formulate cases using the vector obtained from MMSE Case-base reasoning
Display most similar cases as output
2-channel EEG data fusion using MMSE
Remove artifacts from the EEG signals
2-channel EEG signal inputs
The proposed approach combines MMSE and CBR. Here, the MMSE is applied to perform a data level fusion and CBR supports in classification by retrieving most similar cases. A case is formulated with a feature vector and features are extracted by applying MMSE where the algorithm fuses a number of sensor signals. The steps in the proposed system are presented in Fig 2.
Figure 2. Classification based on sensor fusion and case-based reasoning
In the proposed system, MMSE algorithm is applied on 2-channel EEG sensor signal measurements to quantify complexity of the sensor signals. MMSE algorithm is applied up to 20 levels of scale factor and the vector with these 20 features is used to formulate a case for the CBR approach. The weight values of the features are set to identical. In the proposed system, the similarity of a feature between two cases is measured using the modified Euclidean distance and fuzzy similarity. However, the experimental work has been conducted using fuzzy similarity function. A detailed about the fuzzy similarity function is available in [13]. 2.2. CBR Classification based on brain waves frequency features
Feature calculation (α,β,θ) Building cases Case-base reasoning
Display the most similar cases as output
FFT on 2channel EEG data
Remove artifacts from the EEG signals
2-channel EEG signal inputs
The three brain waves i.e., alpha (8-13Hz), beta (13-30Hz) and theta (4-8 Hz) are calculated by means of Fast Fourier Transformation (FFT). The power spectral density (PSD) of2-channel raw EEG data is calculated using FFT.
Figure 3. Classification based on extracted brain wave features and case-based reasoning
During stress situations i.e., when mental concentration and focus become difficult beta waves are highly visible and in relaxed situations alpha waves activates. Theta is visible in drowsiness and delta waves are seen in deep sleep [14]. Therefore, another classification as shown in Fig. 3 is performed considering these brain frequencies. For each brain waves i.e., alpha, beta and theta the minimum, maximum, mean and standard deviation are calculated. For the collected 2-channel EEG data the average of the calculated values are considered as the features. Finally, there are 12 features that represent a case in the CBR system. The weight values, to show the importance of the features, are assigned into two levels. First, the beta, alpha and theta are assigned to 10, 8 and 6 and then minimum, maximum, mean and standard deviation are given the values 7,7,1 and 10 respectively.
3. Result and Discussion To evaluate the approach a prototype systems has been developed using Java and PHP. For the both phases, stress and relaxed, sensitivity and specificity have been calculated for the classification based on sensor fusion and classification using the brain wave frequency features. The sensitivity and specificity analysis is often carried out with binary classification i.e. absence and presence of a disease. For this analysis, all the cases are divided into two groups. That is all Stressed and MathStress phases are in stressed group and all Relaxed and Happy cases are in relaxed group. Except baseline, we have considered data from all the phases i.e., 6 minutes stressed and 6 minutes relaxed for each subject. For one subject we have not considered the relaxed data due to lose connection problem. So there are 17cases that belongs to the stressed and 15 belong to the relaxed group. One case is taken out from the case library at a time and the case is matched against the remaining cases. Here, the system uses the fuzzy
similarity matching function as a local similarity and kNN (k=1) is applied to retrieve the similar cases. For the evaluation purposes, the top most similar case is considered when k=1. Several indices are used to evaluate the system performance and presented in Table 1. Table: 1 Statistical Analysis of the system’s classification when K=1 and K=2
Criteria/Indices Total cases Cases belong to Stressed group (P) Cases belong to Relaxed group (N) True positive (TP): False positive (FP): True negative (TN): False negative (FN): Sensitivity = TP / (TP + FN) Specificity = TN / (FP + TN) Accuracy = (TP+TN)/(P+N)
Classification based on sensor fusion K=1 K=2 32 32 17 17 15 15 11 16 7 4 8 11 6 1 ≈ 0.65 ≈ 0.94 ≈ 0.53 ≈ 0.73 ≈ 0.59 ≈ 0.84
Classification based on brain wave features K=1 K=2 32 32 17 17 15 15 7 13 10 4 5 11 10 4 ≈ 0.41 ≈ 0.76 ≈ 0.33 ≈ 0.73 ≈ 0.38 ≈ 0.75
From Table 1, for sensor fusion based classification, among the 17 stressed cases, 11 are correctly diagnosed as stressed (i.e. true positive) and 6 are incorrectly identified as relaxed (i.e. false negative) by the system. The sensitivity obtains 65% that measures the percentage of stressed cases those are identified as having the stress condition. Similarly, among 15 relaxed cases, 8 are correctly classified as relaxed (i.e. true negative) and 7 are incorrectly classified as stressed (i.e. false positive) by the system. The specificity obtains 53% of relaxed cases are correctly classified as they don’t have any stress condition. The obtained total accuracy is 59%. While for classification based on brain waves achieves an overall accuracy of 38%. The same experiment is also carried out considering K=2 (top 2 similar cases are retrieved), it can be seen from Table 1 that the overall accuracy while classification is based on sensor fusion is higher (84%) than to the classification (75%) using the brain wave features. It can be seen for the sensor fusion based classification, the overall classification accuracy is higher while k=2. The data fusion from multiple sources improves the relevant available information compare to single source.Nevertheless, sensor data fusion using the MMSE provides diagnosis result as a black box classification, no explanation is available for the feature values. On the other hand, classification using the brain wave features is more transparent. Clinicians or users can see the features and corresponding weight values and consequently provides more insights about the diagnosis result. However, it is necessary to include more EEG data in the experiment which is still going on in the project.
4. Conclusion Today’s technological advancement makes sensor data analysis a key aspect in biomedical signal research area. This paper is concerned about investigating the EEG data in identifying individual response during mental stress. The classification result based on EEG sensor data fusion shows that the system could classify stressed group with an overall accuracy of 84% combining the MMSE and CBR. The proposed
approach might also fit to other application domains where data are coming from sensor sources. Acknowledgement The authors would like to acknowledge the Swedish Knowledge Foundation (KKs) and Volvo Construction Equipment AB, Sweden for their support of this research project.
References [1] [2] [3] [4] [5]
[6] [7] [8] [9] [10] [11] [12]
[13]
[14]
S. Ilan and Z. Inna, Multichannel analysis of EEG signal applied to sleep stage classification. Recent Advances in Biomedical Engineering, Intechopen, ISBN 978-953-307-004-9, October 1, 2009 C. W. Anderson, S. V. Devulapalli, and E. A. Stolz, Determining mental state from EEG signals using neural networks. Scientific Programming, 4(1995),171–183. W. C. Anderson and Z. Sijercic, Classification of EEG Signals from Four Subjects During Five Mental Tasks, Proceedings of the Conference on Engineering Applications in Neural Networks, 1996 K. Natarayan, R. Acharya, F. Alias, T. Tiboleng and S. K. Puthusserypady, Nonlinear analysis of EEG signals at different mental states. Biomedical Engineering OnLine, 2004, 3:7 N. Sulaiman, M.N. Taib, S. A. M. Aris, A.H.A. Hamid, S. Lias and Z.H. Murat, Stress features identification from EEG signals using EEG asymmetry and spectral centroids techniques. EMBS Conference on Biomedical Engineering and Sciences. 2010. B. Seymour and R. Dolan. Emotion, Decision Making, and the Amygdala, Journal of Neuron, 58 (2008),662-671. C. Waddell, J.A. Pratt, B. Porr, S. Ewing, Deep Brain Stimulation Artifact Removal Through Under Sampling and Cubic-Spline Interpolation, Image and Signal Processing, (2009), 1-5. C.E. Shannon, W. Weaver, The mathematical theory of communication. United States: University of Illinois Press; 1975. M. U. Ahmed and D.P. Mandic, Multivariate Multiscale Entropy Analysis, IEEE Signal Processing Letters, 19 (2012), 91-94. M. U. Ahmed and D. P. Mandic, Multivariate multiscale entropy: A tool for complexity analysis of multichannel data, Physical Review, 84, (2011), 061918-1 – 061918-10. Aamodt and E. Plaza, Case-based reasoning: Foundational issues, methodological variations, and system approaches, Artificial Intelligence Communications, IOS Press, 7(1994), 39-59. S. Begum, M.U. Ahmed, P. Funk, N. Xiong, M. Folke, Case-Based Reasoning Systems in the Health Sciences: A Survey on Recent Trends and Developments, International journal of IEEE Transactions on Systems, Man, and Cybernetics-Part C: Applications and Reviews, vol 41, Issue 4, 2011, pp 421 434. S. Begum, M.U. Ahmed, P. Funk, N. Xiong and B.V. Schéele, A case-based decision support system for individual stress diagnosis using fuzzy similarity matching, Computational Intelligence, Blackwell Publishing, Volume 25, Nr 3, pp 180-195, 2009.\ The science of brain waves. The language of the brain. Copyright Neurohealth Associates, Specialists in Pediatric and Adult Neurocognitive Disorders. Lombard IL, 2004.