Emotion Recognition using Brainwave Datasets Heba Elgazzar and Bethlehem Seid School of Engineering and Computer Science Morehead State University Morehead, KY, USA
Outline Introduction and Related Work Proposed Method Machine Learning Algorithms Results Conclusion
Introduction Traditionally , we use speech as a form of communication when we are feeling depressed or anxious. E xpressions are vague and don’t describe our emotions very well. Therefore, it is essential to find other methods to understand the mental state of an individual. Our bodies uses electric signals to send and receive messages so measuring the electrical signals to see the mental state of individuals
Introduction The dataset used for this research limits us to 3 emotional state which is positive, negative, and neutral. But this can be easily expanded to other emotions. This EEG test was also expensive and required the assistance of medical professionals to interpret the meaning of the signals. However, with the improvements in technology low-cost commercial devices such as the Emotiv , NeuroSky , and MUSE headband the process of collecting brainwave dataset and interpreting the results has been simplified.
Related Work Other researchers have worked on similar topics using EEG headbands Detecting mental state relaxed, concentrated, and neutral Detecting different positive emotions Detecting emotional state using EEG headband
Proposed Method MUSE EEG headband was used The headband had four electrodes placed on the TP9, AF7, AF8 and TP10 Used to capture the readings within a time window.
Dataset We used an existing public EEG Brainwave dataset this was described and released in for classifying emotional state. In this dataset 2548 different attributes and 2133 instances Two individuals one male and one female were shown 6 different scenes to invoke negative and positive emotions. Three minutes of each state was recorded. In addition, 6 minutes of resting neutral state was recorded.
Dataset To invoke negative emotions D eath scene from Marley and Me produced by Twentieth Century studios O pening death scene from Up produced by Walt Disney Pictures F uneral scene from My Girl produced by Imagine Entertainment. To invoke positive emotions O pening musical number from La La Land produced by Summit Entertainment Nature time-lapse from slow life by BioQuest Studios, F unny dog clips by MashupZone
A naconda which is a free and open-source platform used for scientific computation and package management. Pandas which is a software library for python programming and helps with the data manipulation and analysis. Matplotlib which is a library for plotting
Supervised machine learning techniques were chosen for this research Supervised learning is where a dataset and its labels is provided. The data is then split into training and testing sets Training set is used to develop algorithm can produce a way to predict the label of an unknown item by using the information previously provided. Testing set is used to measure how well the algorithm is performing by comparing the predicted label to the actual label given in the dataset. Dataset
The classification algorithm used in this research are: K -Nearest N eighbors( KNN) D ecision T rees R andom Forest Artificial N eural N etwork( ANN). Dataset
K -nearest neighbors KNN KNN is a simple machine learning algorithm Based on data elements that are classified in a group will have similar attributes. So, a data will be classified into a group by first finding the closest points then classify the point based on majority vote of the K neighbors. The closeness will be calculated using the Euclidean distance
Pros Training is much faster compared to other classification algorithms. Useful in case of nonlinear data. Used with the regression problem. Cons Slow and costly Requires large memory for storing the entire training dataset for prediction. Not suitable for large dimensional data. K -nearest neighbors KNN
Decision Trees Flowchart-like upside-down tree structure. Root represents the entire dataset N odes represent a single feature Branch represents the decision rule for partitioning Leaves represent the outcome/classes. Partitioning is done by first calculating the entropy which is the measure of impurity
Decision Trees Pros Decision trees are easy to interpret and visualize. It can easily capture Non-linear patterns. The decision tree has no assumptions about distribution Cons Sensitive to noisy data. The small variation in data can result in the different decision tree Decision trees are biased
Random Forest Similar to decision tree Overcomes the drawbacks of the decision tree Creates several decision trees It c lassifies the data based on majority vote from the several decision trees
Artificial Neural Networks Modeled after the human brain P rocesses information in a very complex and nonlinear fashion by using a web of neurons that communicate through electric signals. If the sum reaches a certain threshold, then it transmits message to the other neurons. Here, weight represents the strength of the connection of between the two neurons. Weight and the bias are the parts that are adjusted as the neural network is learning.
Feature Selection Principal Component Analysis (PCA) Linear dimensionality reduction Preserves the essential parts that have more variation of the data Cluster the similar data points based on the feature correlation Features selected based on the variance or based on the number of components
Feature Selection SelectKBest The correlation of the different independent features and the outcome Univariant feature selection Pick a feature do a chi-square test with the target variable find out the statistical significance of the test of independence and keep feature based on the test of the significance then select the top K features to run the data on ReliefF Filter -method approach to feature selection Scoring is based on the identifying the feature’s value difference compared to its nearest neighbor The closest same-class instance is called 'near-hit', and the closest different-class instance is called 'near- miss'
Results Using PCA
Results Using SeleckKBest
Conclusion In this research, we proposed a novel method for classifying the emotional state of individuals using few features. ANN shows promising results when using principal component analysis Random forest performed better when using SelectKBest KNN showed the least accurate results