Emotion Recognition With Machine Learning Using EEG Signals: Omid Bazgir Zeynab Mohammadi Seyed Amir Hassan Habibi
Emotion Recognition With Machine Learning Using EEG Signals: Omid Bazgir Zeynab Mohammadi Seyed Amir Hassan Habibi
Emotion Recognition With Machine Learning Using EEG Signals: Omid Bazgir Zeynab Mohammadi Seyed Amir Hassan Habibi
EEG Signals
Omid Bazgir*
Zeynab Mohammadi Seyed Amir Hassan Habibi
Department of Electrical and
Department of Electrical and Department of Neurology of Rasool
Computer Engineering
Computer Engineering Akram Hospital
Texas Tech University
University of Tabriz Iran University of Medical Sciences
Lubbock, Texas, USA
Tabriz, Iran Tehran, Iran
Email: omid.bazgir@ttu.edu
Abstract—In this research, an emotion recognition system is attributes of the classifiers. A variety of features have been
developed based on valence/arousal model using extracted from the time domain [4], frequency domain [5], and
electroencephalography (EEG) signals. EEG signals are joint time-frequency domain [6] from EEG signals, in
decomposed into the gamma, beta, alpha and theta frequency intelligent emotion recognition systems. The wavelet
bands using discrete wavelet transform (DWT), and spectral transform is able to decompose signals in specific frequency
features are extracted from each frequency band. Principle bands with minimum time-resolution loss. To this end,
component analysis (PCA) is applied to the extracted features choosing an appropriate mother wavelet is crucial.
by preserving the same dimensionality, as a transform, to make Murugappan [7] considered four different mother wavelets,
the features mutually uncorrelated. Support vector machine
namely ‘db4’, ‘db8’, ‘sym8’ and ‘coif5’ to extract the
(SVM), K-nearest neighbor (KNN) and artificial neural
network (ANN) are used to classify emotional states. The cross-
statistical features, including standard deviation, power and
validated SVM with radial basis function (RBF) kernel using entropy from EEG signal. The KNN classifier was employed
extracted features of 10 EEG channels, performs with 91.3% to classify five categories of emotions (disgust, happy,
accuracy for arousal and 91.1% accuracy for valence, both in surprise, fear, and neutral). The supreme accuracy rate was
the beta frequency band. Our approach shows better about 82.87% on 62 channels and 78.57% on 24 channels.
performance compared to existing algorithms applied to the Nasehi and Pourghasem [8], applied Gabor function and
“DEAP” dataset. wavelet transform to extract spectral, spatial and temporal
features from four EEG channels. The artificial neural
Keywords: Emotion, Machine Learning, Valence-arousal, network (ANN) classifier was used for classification of six
EEG, DWT, PCA, SVM, KNN. kinds of emotions (happiness, surprise, anger, fear, disgust
and sadness), with 64.78% accuracy. Ishino and Hagiwara
I. INTRODUCTION extracted mean and variance from power spectra density
Emotion states are associated with wide variety of human (PSD), wavelet coefficients of EEG data. Then, a neural
feelings, thoughts and behaviors; hence, they affect our ability network was trained based on the principal components of the
to act rationally, in cases such as decision-making, perception features to classify four types of emotion (joy, sorrow,
and human intelligence. Therefore, studies on emotion relaxation and anger) with 67.7% classification rate.
recognition using emotional signals enhance the brain- Mohammedi et al [9], extracted spectral features including
computer interface (BCI) systems as an effective subject for energy and entropy of wavelet coefficients from 10 EEG
clinical applications and human social interactions [1]. channels. The maximum classification accuracy using KNN
Physiological signals are being used to investigate emotional was 84% for arousal and 86% for valence. Jie et al [10]
states while considering natural aspects of emotions to employed Kolmogorov-Smirnov (K-S) test to select an
elucidate therapeutics for psychological disorders such as appropriate channel for extracting sample entropy as a feature
autism spectrum disorder (ASD), attention deficit and used it as input of an SVM. The maximum accuracy of
hyperactivity disorder (ADHD) and anxiety disorder [2]. In Jie’s method is 80.43% and 71.16% respectively for arousal
recent years, developing emotion recognition systems based and valence. Ali et al [11], combined wavelet energy, wavelet
on EEG signals have become a popular research topic among entropy, modified energy and statistical features of EEG
cognitive scientists. signals, using three classifiers including; SVM, KNN, and
quadratic discriminant analysis (QDA), to classify emotion
To design an emotion recognition system using EEG states. The overall obtained classification accuracy of Alie’s
signals, effective feature extraction and optimal classification method was 83.8%.
are the main challenges. EEG signals are non-linear, non-
stationary, buried into various sources of noise and are random Different theories and principles have been proposed by
in nature [3]. Thus, handling and extracting meaningful experts in psychology and cognitive sciences about defining
features from EEG signals plays a crucial role in an effective and discriminating emotional states, such as being cognitive
designing of an emotion recognition system. Extracted or non-cognitive. In this heated debate that continues to go
features quantify the EEG signals and then are used as on, there is one claim that states that instead of classifying
emotions into boundless common, basic, types of emotions
such as; happiness, sadness, anger, fear, joy so on and so forth, B. Channel selection
emotion can be classified based on valence-arousal model According to Coan et al. [15], positive and negative
introduced the rooted brain connectivity [12, 13]. The emotions are respectively associated with left and right frontal
valence-arousal model is a bi-dimensional model which brain regions. They have shown that, the brain activity
inculdes four emotional states; high arousal high valence decreases more in the frontal region of the brain as compared
(HAHV), high arousal low valence (HALV), low arousal high to other regions. Therefore, the following channels were
valence (LAHV) and low arousal low valence (LALV) [1]. selected to investigate in this study: F3-F4, F7-F8, FC1-FC2,
Therefore, each of the common emotional states can be FC5- FC6, and FP1- FP2.
modeled and interpreted based on valence-arousal model,
figure 1. C. Preprocessing
To reduce the electronic amplifier, power line and
external interference noise, the average mean reference
(AMR) method was utilized. For each selected channel, the
mean is calculated and subtracted from every single sample
of that channel. To reduce the individual difference effect, all
the values were normalized between [0, 1].
D. Feature extraction
Due to DWT effective multi-resolution capability in
analysis of non-stationary signals, we followed our previous
work [9] for the feature extraction, in which, DWT was
applied on the windowed EEG signals of the selected
channels. The EEG signals are windowed due to increasing
possibility of the quick detection of the emotional state. Thus,
the 4- and 2-seconds temporal windows with 50% overlap
were chosen. The EEG signals are decomposed into 5
different bands, including; theta (4-8 Hz), alpha (8-16 Hz),
beta (16-32 Hz), gamma (32-64 Hz) and noises (> 64 Hz) via
Figure 1. Interpretation of different emotions based on valence-
arousal model [12].
db4 mother wavelet function. Afterwards, the entropy and
energy were extracted from each window of every frequency
In this paper, an emotion recognition system is developed band.
based on the valence-arousal model. We applied wavelet Entropy is a measurement criterion of the amount of
transform on EEG signals, then energy and entropy were information within the signal. The entropy of signal over a
extracted from 4 different decomposed frequency bands. PCA temporal window within a specific frequency band is
was used to make the attributes uncorrelated. SVM, KNN and computed as:
ANN are utilized for emotional states classification into 𝑁