EmotionNet: Dissecting Stress and Anxiety Through EEG-based Deep Learning Approaches

—Amid global health crises, such as the COVID-19 pandemic, the heightened prevalence of mental health disorders like stress and anxiety has underscored the importance of understanding and predicting human emotions. Introducing "EmotionNet," an advanced system that leverages deep learning and state-of-the-art hardware capabilities to predict emotions, specifically stress and anxiety. Through the analysis of electroencephalography (EEG) signals, EmotionNet is uniquely poised to decode human emotions in real time. To get information from pre-processed EEG signals, the EmotionNet architecture combines convolutional neural networks (CNN) and long short-term memory (LSTM) networks in a way that works well together. This dual approach first decomposes EEG signals into their core alpha, beta, and theta rhythms. We preprocess these decomposed signals and develop a CNN-LSTM-based architecture for feature extraction. The LSTM captures the intricate temporal dynamics of EEG signals, further enhancing understanding. The end process discerningly classifies signals into "stress" or "anxiety" states through the AdaBoost classifier. Evaluation against the esteemed DEEP, SEED, and DASPS datasets showcased EmotionNet's exceptional prowess, achieving a remarkable accuracy of 98.6%, which surpasses even human detection rates. Beyond its technical accomplishments, EmotionNet emphasizes the paramount importance of addressing and safeguarding mental health.


INTRODUCTION
Human emotionality, with its intricate facets, has been a subject of rigorous study and interest for decades [1].Particularly, emotions like stress and anxiety significantly influence behavior, cognition, and overall well-being.The myriad stimuli that individuals face in their daily lives elicit a plethora of emotional reactions, profoundly anchored to brain activity [2].Occasionally, misinterpretation of these behavioral shifts can lead to potential misdiagnoses [3].It is crucial to note that while academic literature often uses 'stress' and 'anxiety' interchangeably due to symptom similarities, clear distinctions exist [4].Stress usually emanates from external stimuli and can manifest as anger, unhappiness, or feelings of overwhelm.Conversely, anxiety is persistent; lingering even after the causative stressor is resolved, and often marked by symptoms like restlessness, nervousness, or unease [5].
There are nuanced categorizations within anxiety itself, notably state and trait anxiety [6].State anxiety relates to immediate, situational responses, while trait anxiety is an enduring aspect of an individual's personality.Researchers employ distinct methodologies, such as rest state recordings and responsive tests, to measure these anxiety types [7].With the prevalence of anxiety disorders affecting a significant portion of the global population, understanding them becomes imperative [8].Statistics, such as those from the USA, show alarming rates of anxiety disorders and related hospitalizations, emphasizing the need for accurate diagnosis and intervention [9].Moreover, numerous studies have well documented the correlation between anxiety disorders and other medical conditions, such as cardiovascular diseases [10].
Clinical diagnosis of anxiety poses challenges primarily because of the symptomatic overlap with other conditions like depression [11].Though symptom-based diagnosis assists clinicians, it doesn't provide an objective, quantifiable measure of the underlying causes.In this context, the biomedical community suggests certain chemical biomarkers as promising tools for anxiety assessment [12].Emerging technologies promise innovations in emotional analysis."EmotionNet," an advanced system, leverages the power of LSTM networks and CNNs for detailed stress and anxiety detection through EEG signals [13].As brain state detection advances, researchers view EEG signal analysis as a transformative tool that offers insights into the brain's electrical activities and corresponding emotions [14].As neural networks improve, they can process these EEG signals, particularly when transformed into spectrograms, to reveal the intricate details necessary for precise stress identification [15].Finally, while traditional neural networks have made significant strides, there's a pressing need for more nuanced, advanced systems.Emphasizing relevant feature extraction, considering the challenges of datasets and enhancing accuracy are pivotal.Current methodologies, like spectrogram-based and signal processing-based techniques, offer great promise for refining emotional analysis [16].
The proposed study looked into how EEG data parameters (such as electrode selection and frequency bands) affect the classification of anxiety.However, it had some problems, like not being very good at detecting anxiety levels and having a long feature vector length.In contrast, the proposed approach refines this by selecting an optimal subset of EEG features, ensuring better efficiency without compromising the entire EEG data's breadth.This paper introduces EmotionNet, a novel hybrid architecture that significantly advances the field by discerning emotions from EEG signals.There are the following main contributions to this paper: www.ijacsa.thesai.org 1) Researchers introduced a unique preprocessing methodology that transformed EEG data into azimuthal projection images.By focusing on the alpha, beta, and theta signals, this method provided a fresh perspective on stress detection, enhancing the richness and specificity of the data.
2) Researchers developed a pioneering model called "EmotionNet."This hybrid system, combining the strengths of both LSTM and CNN, processes the azimuthal projection images derived from EEG signals.Its robust architecture classifies these images into two distinct classes: stress and non-stress.This innovative integration stands as a hallmark of blending traditional EEG processing with advanced neural network architectures.
3) By leveraging the augmented dataset for both training and testing phases, we achieved a significant enhancement in stress and anxiety detection accuracy.We also compared the system's performance with existing state-of-the-art methods.The results underscored the model's superiority and its potential to set new benchmarks in EEG-based stress detection.
In practice, this research has provided transformative contributions to the domain of stress and anxiety detection using EEG signals, setting new standards in preprocessing, model development, and overall system accuracy.
The organization of this paper is as follows: Section II delves into a comprehensive literature review, setting the groundwork for the study.Section III introduces the proposed methodology and elaborates on the specifics of the model.Section IV compares the results derived from the dataset utilized with established state-of-the-art methods for a comparative understanding.The paper culminates in Section V and Section VI, offering discussion and a concise conclusion reflecting on the study's findings.

II. LITERATURE REVIEW
Emotion recognition, using EEG signals, has been a focal point in Emotion recognition using EEG signals has been a focal point in various studies.In the study [7], a headband equipped with four screen-printed active electrodes was utilized to capture EEG signals.OpenViBE, an open-source software, processed the EEG signals captured using a headband equipped with four screen-printed active electrodes.Additionally, the signals were amplified through an "EEG-SMT" biofeedback board.We employed classification algorithms such as Signal Power (SP), Power Spectral Density (PSD), and Common Spatial Pattern (CSP).Similarly, in a study [8], the MUSE 2 headset recorded neuro-psychological signals from subjects as they viewed standardized movie clips.An LSTM deep learning model processed this data.
Study [9], utilizes the DEAP dataset, recorded EEG signals from 32 volunteers.Feature extraction focused on temporal, regional, and asymmetric dimensions, with a deep learning classifier aiding in emotion categorization.In studies [10] and [16], participants watched music video clips.For EEG feature extraction, researchers employed wavelet transform and approximate entropy, and for emotion classification, they utilized machine learning classifiers such as SVM and Random Forest.The study in [12] took a multimedia approach, combining EEG with galvanic skin responses to recognize emotions.
The potential of convolutional neural networks (CNN) in this domain was highlighted in a study [17], which introduced a randomized CNN model, significantly reducing the need for backpropagation.This approach, on the DEAP dataset, yielded impressive results.Building on this, the study [18] integrated principles from genetic code, achieving up to 92% accuracy on datasets like DEAP and MAHNOB.A study [19] explored stress's health implications, using the EEGnet model to achieve 99.45% accuracy in detecting stress levels in subjects exposed to music experiments.
Advancing further, study in [19] integrated multi-input CNN-LSTM models to analyze fear levels, while study [20] employed CNNs on the UCI-ML EEG dataset to diagnose alcoholism, achieving a 98% accuracy rate.A study [21] merged deep learning models for stress detection, emphasizing their superiority over traditional models.The MODMA dataset was the foundation for the study [22], which utilized CNNs and recorded a commendable 97% accuracy rate.A study [23] delved into the emotional aftermath of COVID-19 among students using an RCN-L system combined with LightGBM techniques, registering around 92.63% accuracy.Lastly, a study [24] simulated mental stress scenarios in a humanmachine context, using neural activation features to achieve an 89% accuracy rate.These studies accentuate the versatility and importance of EEG signals in comprehending emotions, with technology playing a pivotal role in this exploration.The following table shows a summary of the related works as well as their outcomes and the accuracy of the studies as mentioned in Table I

III. METHODOLOGY
As emotions are the cause of many diseases, identifying these emotions is crucial in order to get the correct medications.One way of identifying these emotions is by using EEG signals.EEG captures scalp electrical activity generated by brain structures [14].There are many different devices that capture these electrical activities, e.g., brainwaves or TGAM.These devices can then process the captured signals and extract the desired emotion.Therefore, the proposed study tries to study EEG signals and how to use these devices to get these signals.Then, the ensemble-based deep learning architecture is used to predict the mental status of the user from the EEG signals used as data that are gathered from the device.The system architecture of the proposed EmotionNet is shown in Fig. 1.

A. Data Acquisition
The proposed approach utilizes the SJTU emotion EEG dataset (SEED) from the brain-like computing and machine learning (BCMI) methods [27].This dataset features EEG data from 15 subjects, recorded over three sessions as they watched various Chinese film clips eliciting distinct emotions.After each clip, participants shared their emotional responses through questionnaires.The EEG data, captured using a 62-channel electrode cap, was down-sampled to 200 Hz and subjected to a 0-75 Hz band-pass filter.We used the DEAP dataset to analyze emotions through EEG signals [28].This data encompasses 32 participants exposed to 40 one-minute music videos, each inducing a consistent emotion.Recorded data from 32 EEG channels was down-sampled to 128 Hz for reduced system complexity.Another study [29] employed the DASPS database, which centers on EEG responses during exposure therapy, a variant of cognitive behavioral therapy (CBT).This database comprises EEG data from 23 healthy participants.These participants, prior to the experiment, provided written consent and gauged their anxiety using the Hamilton Anxiety Rating Scale.
The aim of the study was to detect stress using the proposed model.The data was provided in the form of 'mat' files, which were read into the Python program using the SciPy library.This paper used data augmentation techniques to generate new data for training the neural network.In this study, the anxiety state from the SEED, DEAP, and DASPS datasets was considered to be a stressful state for the target task.Dataaugmentation techniques can be used to increase the size of the existing EEG dataset.Generating additional data by applying transformations to the existing data, such as shifting the signal in time or adding noise, is performed to increase the sample size.This can help increase the variability in the data and improve the generalizability of the model.www.ijacsa.thesai.org

B. Preprocessing
Electroencephalography (EEG) is a modern electrophysiological screening mechanism that is used to record the electrical activities of the brain.The EEG method measures fluctuations in voltage ensuing from the current generated by the flow of ions in the brain neurons [14].The EEG signals can be categorized into five main groups, which are Delta, Alpha, Theta, Beta, and Gamma.A delta signal or wave is a neural oscillation with high amplitude and varied frequencies ranging from 0.5 hertz to 4 hertz [17].The wave is commonly associated with sleep.Alpha signals have frequencies ranging from 7.5 hertz to 13 hertz.It is commonly experienced in the posterior areas of the brain when a patient closes and relaxes their eyes.The theta signal is a slow-activity wave with a frequency ranging between 3.5 hertz and 7. 1) Signal filtration: Signals from an EEG device usually have a lot of noise and other artifacts that may originate from sources that can be biological or environmental [30].A filter removes some of the unwanted signal features when processing a signal.Filtering represents a class in signal processing that entails partial or complete suppression of certain aspects of a signal.EEG commonly refers to digital filtering as the usual pre-processing phase in analyzing the EEG data.The usual exercise in processing EEG signals includes applying a high-pass filter for the elimination of the slow frequencies with a lesser amount of 0.1 Hz and a lowpass filter to remove frequencies that are above 40 to 50 Hz.
Signal filtering refers to the modification of a measured signal through the use of an algorithm or logic to eliminate its undesirable features before it is adopted by a controller.Some of the examples in control include feedback variables for proportional-integral-derivative (PID) and advanced process control (APC) controllers [31].The examples of calculations entail computations centered on steady-state material balances, the process, and the control metrics.The primary objective of signal filtering is to reduce and smooth the high-frequency noise related to flow, temperature, or pressure measurements.Noise related to differential pressure across the orifice plate is a common example used to infer flow rate.High-frequency noises are usually considered random and an additive in the measured signal and are normally uncorrelated in the period Fig. 2. Filters can be categorized based on their design as either finite impulse response (FIR) or infinite impulse response (IIR) [32].The impulsive response refers to how the filter works with the unit impulse signal within the time domain.The FIR filter has a finite-distance impulse response; then, its output drops to zero, producing equal delays for all frequencies.The IIR filters, on the other hand, have an infinite impulse reaction.It also produces unequal delays.However, its main advantage is that it is computationally highly efficient.Another feature in the design of filters is the signal direction when used as an input.Causal filters comprise past and present information.Similarly, it refers to filters that rely on future and past input as noncausal filters.
After recording and filtering an EEG signal, researchers need to extract its features.The Fast Fourier Transform (FFT) is a feature extraction method used for extracting the finer details of emotions such as spectral entropy and spectral centroid.FFT extracts these simple features from the alpha, beta, and alpha to gamma frequencies.Seeing that the theta and delta have a very lowfrequency range, The FFT method does not require the lower frequencies due to their lack of sufficient information.After filtering the signal and isolating the relevant signals, they remain unidentified and require classification.The KNN algorithm has a majority voting scheme, which will be used to classify the unidentified signals.The algorithm classifies the new data based on the highest number of votes.The majority vote schemes are used instead of the similarity vote schemes because they are less sensitive to the outlier, which aids the FFT since it is a method for extracting the finer details [33].
where, F [K] is the amplitude corresponding to bin k in the FFT spectrum.
To filter the EEG signal from noise, this paper used the MNE-Python Library.The MNE-Python Library provides algorithms implemented in Python that cover multiple data preprocessing methods to reduce noise from external (environmental) and internal (biological) sources.The two categories of noise filtering strategies are eliminating contaminated data segments and using signal processing techniques to attenuate artifacts.The MNE-Python library provides these two categories at different stages of the pipeline through functions that use automatic or semi-automatic data pre-processing along with interactive plotting capabilities.
The first step of pre-processing entails restricting the signal to a chosen frequency range.The MNE-Python library includes various filtering algorithms such as low-pass, high-pass, bandstop, and notch filtering.A high-pass filter is used to filter out slow frequencies and high frequencies with a low-pass filter.And the bandpass, where frequencies pass between defined upper and lower frequencies.Band-stop is the inverse of bandpass, where frequencies between upper and lower defined frequencies are rejected.Instances of raw data are filtered using a method that supports both fast fourier transform (FFT) based on finite impulse response (FIR) and finite impulse response (IIR) filters.The standard multiprocessing Python module exposed with the Joblib Python pipeline tool allows for parallel filtering of multiple channels.We will be using the FIR filter in this paper.
The finite impulse response (FIR) [34] filters can have a linear phase, so they have the same delay at all frequencies, while IRR filters cannot.The phase and delay group characteristics are also usually better for FIR filters.FIR filters are much easier to control and are always stable.FIR filters have a well-defined passband, can be converted to minimumphase, and can be corrected to zero-phase without additional computations.MNE-Python provides FIR filters with 0.16, 0.15, and 0.13 default constant filter delays.Also, it provides two other filters called MNE-C default and minimum-phase.As shown below in Fig. 3, a signal is tested with different types of FIR filters in MNE-Python and a low-pass of 40 Hz.The blue signal represents the original signal without applying any filtration, whereas the orange signal represents the original signal with noise.Other colored signals represent the type of filter used on them, as shown in Fig. 3.

C. Features Extraction
The authors of this paper utilized the CNN-LSTM [35], [36] feature extraction method.CNN proved to be good at extracting signal patterns but had a disadvantage in terms of long-term dependency.LSTM solves the problem by providing an excellent long-term dependency, allowing it to be used as a time series and negating the CNN disadvantage.After being filtered, the signal goes through the CNN-LSTM process, as shown in the figure below.The classification process will receive the signal after it has been filtered and processed www.ijacsa.thesai.orgthrough the CNN-LSTM process.A convolutional neural network (CNN) is a deep learning algorithm with the ability to process images.CNN also proved that it could detect patterns from brainwaves, such as emotions, in a multi-channel EEG recording, which also gives it the ability to process EEG signals.A long-short-term memory (LSTM) is a neural network that can learn based on the predictions of a given problem.A recurrent neural network (RNN) is a network with highly efficient working internal memory for predicting time series.LSTM is just an extension of an RNN cell, which overhauls the disadvantages of RNN.
Since CNN is an image-processing algorithm, this paper is going to change the EEG signal into an image and pass it to CNN.After passing through CNN, it goes through the LSTM for the time series.Combining the CNN and LSTM is essential, as they rely on each other for effective functioning.The LSTM passes the signal to the classifier to identify the emotion (see Fig. 4).CNN applied to the pre-processed signals.CNN has three major elements: local sensing fields, weight sharing, and downsampling.These three elements can decrease network complexity, which is good.Also, CNN has high accuracy because it can learn from non-linear convolution and local nonlinear activation functions.Many CNNs combine using pooling as layers to create a close enough representation of the intermediate features from the signals, expressing a high level of features.The convolution layer uses a filter on the input data to produce feature maps.The filter slides over the input to execute the convolution.Matrix multiplication is performed at every position, and the results are then summed onto the feature map.CNN's pooling layer takes smaller samples of the features that the convolution layer found.This cuts down on the amount of work that needs to be done and the extent to which the network is overfitted.Only necessary information should be extracted from a pooling process, and irrelevant information should be discarded.This greatly enhances the performance of CNN.Fig. 5 shows the convolution-max pooling process.Fig. 6 shows the proposed CNN model structure.As seen in Fig. 5 and Fig. 6, CNN is made for capturing local spatial features of the data, but CNN cannot capture the data sequence in a long-term dependence relationship, and it can vanquish the weaknesses of CNN.A combination of CNN and LSTM creates a hybrid model, resulting in excellent performance in signal recognition.The raw data is preprocessed and filtered from the noise, and then it enters the CNN model for feature maps before entering the LSTM for the time series.

D. Human Anxiety and Stress Classification (AdaBoost Classifier)
The classification method uses the SoftMax classifier.After the convolution-max pooling has been flattened, it is then passed to the fully connected FC.The SoftMax classifier then receives the final vector as input.The SoftMax classifier then assigns an emotion to the given final vector input.Emotional recognition is the process of identifying emotions.Facial expressions, voice impressions, written texts, psychology, and electrode devices placed on the head can all be used to recognize emotions.
Emotion recognition is going to perform in this paper as follows: A TGAM device is utilized to extract the brain's signals.These signals are called EEG signals and are raw; thus, they need to be cleansed from noise to further increase the accuracy of the emotion extraction.The filtered EEG signal then proceeds to the feature extraction process, where it undergoes a series of methods known as CNN-LSTM.In there, the signal will first go through the convolution and Max-Pooling processes of the CNN several times before being sent to the LSTM for the time series for long-term dependency.Finally, the CNN-LSTM processes the signal and then classifies it using the SoftMax classification method to assign an emotion.After the signal has gone through all these processes, the result will then be that person's emotion at the time of the signal extraction.Because there are many emotions to recognize, this paper focused on detecting anxiety, stress, depression, etc., with good accuracy rather than detecting more emotions with less accuracy.
Initialization: F← Load(F) Anxiety and Stress Classification using AdaBoost: ∀i ∈{1, 2,..., n}: ← A i ←AdaBoost(F i ) Class Label Assignment: ∀i∈{1,2,...,n}: Else L i ← "Neutral" End AdaBoost, short for "Adaptive Boosting," has emerged as a potent ensemble machine learning technique that focuses on the principle of amalgamating the strengths of numerous "weak" classifiers to forge a robust classifier.Its application in EEG feature classification for discerning stress and anxiety presents a unique approach that offers notable advantages.
At the beginning of the AdaBoost process, each EEG data point or feature vector weighs equally, ensuring a level playing field.A weak classifier, often a simple decision tree known as a "decision stump," is trained on these features.Despite its designation as "weak," the classifier's aim isn't sheer randomness but to surpass random guesswork, albeit marginally.Following the training, this classifier undergoes an evaluation phase.Meticulously identifying the misclassified instances and incrementing their weights pushes the subsequent classifier to concentrate more assiduously on the challenging, previously misclassified instances.This iterative emphasis on the "hard-to-classify" instances is where AdaBoost truly shines.One of the key steps in the AdaBoost algorithm is the assignment of weights to the classifiers themselves.Classifiers with higher accuracy have greater influence, allowing them to play a more significant role in the final decision-making process.This hierarchy ensures that better-performing classifiers play a pivotal role.
As AdaBoost iterates, the process undergoes fine-tuning.Each cycle refines the classifier weights, focusing more on the problematic instances.Such a continuous feedback loop ensures that, by the end of the specified iterations, the ensemble is adept at handling a majority of the scenarios, including the challenging ones.AdaBoost does not rely on a single classifier to classify a new EEG feature vector.Instead, it consults its ensemble, with each member casting a weighted vote based on its accuracy.The culmination of these votes determines whether the EEG feature vector corresponds to stress, anxiety, or a neutral state.The inclusion of fine-tuning in this process is pivotal.The EEG data, with its intricacies and subtle nuances indicative of stress or anxiety, demands a classifier that is both adaptive and discerning.AdaBoost, with its iterative refinement and emphasis on challenging instances, stands out as an ideal choice.By progressively focusing on the harder-to-classify instances and adjusting classifier influence based on performance, AdaBoost ensures that the final model is not just a mere aggregation but a finely-tuned ensemble primed for accuracy.

A. Experimental Setup
The proposed method is executed on a common platform machine with an Intel Core i7 10th generation processor and 32 GB of RAM without using a GPU.Despite being a complex processing method that combines signal and image processing, it requires a relatively small number of epochs for better accuracy, leading to less training time.It also optimizes the average prediction time for each input.The complete dataset is split into an 80-20 ratio to create the test dataset, with 20% reserved for testing.

B. Statistical Analysis
Performance evaluation of classification models is vital for understanding their efficacy.In comparing the proposed solutions with existing ones, several metrics are employed.
A fundamental metric for classification models, accuracy provides an aggregate measure of the model's ability to predict correctly.It computes the ratio of correctly predicted instances to the total number of instances, and it's defined as: True Positive (TP) and True Negative (TN) represent correct predictions, while False Positive (FP) and False Negative (FN) denote incorrect predictions.A model with high www.ijacsa.thesai.orgaccuracy implies reduced prediction errors, which can have significant cost implications.
Often referred to as Recall, True Positive Rate, or Hit Rate, sensitivity captures the model's proficiency in predicting positive instances accurately.It is expressed as: Recall=TP/(TP+FN)×100 (4) A high recall indicates a low FN rate, signifying that the model has a commendable ability to detect positive instances.
This metric evaluates the model's skill in correctly predicting negative instances.Defined as the ratio of true negatives to the sum of true negatives and false positives, it is formulated as: (5) Fourth measurement is Precision.Precision measures the proportion of accurately predicted positive instances against all predicted positive instances.It's an indication of the model's ability to correctly identify positive instances among all predicted positives.Its formula is: (6) Fifth measurement is F1-score.Combining both precision and recall, the F1-score offers a balanced metric that considers the harmonic mean of precision and recall, making it essential for understanding a classifier's robustness and accuracy.It's defined as: (7) In essence, these metrics collectively provide a comprehensive view of a classifier's performance, ensuring that its strengths and weaknesses across different dimensions are adequately captured and understood.

C. Experimental Results
Python is chosen as the programming language for this paper because it offers simplicity, consistency, flexibility, and accessibility to various libraries and frameworks.Python is a dynamic, high-level object-oriented programming language that offers perfect solutions to machine learning due to its independence.Furthermore, its independence across platforms makes Python resource-and time-saving in deep learning, where the developers would incur more resources to complete a paper.The Python language is reliable due to its ability to run on multiple platforms without the need to change.Python is easy to execute, making it a standalone solution to meet machine learning needs.These features have made it more popular.It's also popular because of its useful libraries and packages that save time and reduce the likelihood of errors.The libraries and frameworks offer a reliable environment for machine learning due to their pre-written codes that speed up coding when working on a complex paper like the current one.Python's interpreted nature allows for faster code execution without the need for a compiler.The aforementioned properties make Python a priority for this paper.EmotionNet has obtained accuracy equal to 98.6%.To calculate the metrics of this paper, this study used accuracy, sensitivity (SE), specificity (SP), precision, recall, and F1-Score.Four variables are used in the calculations.These variables are: true positive (TP), which equals 317; true negative (TN), which equals 312; false positive (FP), which equals 4; and false negative (FN), which equals 0. The authors created the confusion matrix below using the 80-20 split for training and testing, respectively, as shown in Fig. 8.In this paper, the author has also calculated the confusion matrix for 70-30, 60-40, and 50-50.As seen from their respective figures, the numbers are much lower than expected.But the accuracy rating is also lower than 80-20.And for that reason, this paper has gone with the 80-20.www.ijacsa.thesai.orgThis study has chosen to go with the 80-20 method because it gave us the best result in terms of accuracy.Also, the loss is approximately 11%, which is the least we got.Below are two emotions classes anxiety and stress as shown in Fig. 9.They are both visualized in signals with all eight ranges which are Delta, theta, low alpha, high alpha, low beta, high beta, low gamma, and high gamma.Also, both are shown with and without a filter to showcase the difference between a clean signal and a noisy signal.
As you can see from TABLE II., the proposed accuracy result is 98.6%.Reference [23] only uses CNN with an accuracy result of 94.83%.Reference [9] only uses LSTM with an accuracy result of 91.85%.This paper used the combination of both CNN and LSTM.It showed that it has better potential rather than just using CNN or LSTM individually.Reference [18] on the other hand uses both CNN and LSTM but has a lower accuracy rating than EmotionNet.This means that having an efficient architecture is most critical.It can be seen from their accuracy result, which is 80.57%.V. DISCUSSIONS The exploration and classification of EEG signals to discern and quantify emotional states such as stress and anxiety have witnessed a radical evolution with the integration of advanced machine learning algorithms.At the heart of this investigation is the objective to achieve a nuanced understanding of the myriad emotional responses of the human brain and harness this knowledge for clinical and therapeutic applications.www.ijacsa.thesai.org The initial foray into EEG-based emotion classification was governed by a preliminary preprocessing phase [37].The preprocessing and filtration stages were crucial in addressing the contamination of EEG recordings by a variety of artifacts, from biological to environmental origins.The defined algorithm effectively trimmed the EEG signal to a desirable frequency range, addressing both high and low frequencies, ensuring an optimized dataset for feature extraction.The adopted approach rigorously eliminated unnecessary complexities and preserved relevant data, laying the groundwork for the subsequent steps.
Table II presents a state-of-the-art comparison of various approaches in the field of emotion recognition.The proposed EmotionNet achieves an impressive accuracy result of 98.6%, showcasing its superiority over other methods.Reference [23] solely employs CNN architecture and achieves an accuracy of 94.83%, while Reference [9] utilizes LSTM and achieves an accuracy of 91.85%.Notably, the proposed EmotionNet combines both CNN and LSTM, demonstrating better potential compared to using CNN or LSTM individually.It is worth mentioning that Reference [18] also employs a combination of CNN and LSTM but achieves a lower accuracy rating than EmotionNet, emphasizing the importance of an efficient architecture.The table includes additional performance metrics such as sensitivity (SE), specificity (SP), and F1-Score for each approach, providing a comprehensive overview of their capabilities in emotion recognition.
Upon having a refined EEG dataset, the challenge transitioned to extracting meaningful features that encapsulate the emotional spectrum of the human brain.This is where the integration of deep learning models, namely CNN and LSTM, came into play.CNNs, with their prowess in handling imagebased data, converted EEG signals into spectrogram-based images, enabling a richer feature extraction process.On the other hand, LSTMs processed the sequential data in the timeseries nature of EEG data.The symbiosis of CNN and LSTM exhibited efficacy in gleaning relevant features indicative of different emotional states.
However, the pinnacle of exploration was the application of the AdaBoost classifier, fine-tuned to achieve optimal classification results.AdaBoost's adaptability in combining multiple "weak" classifiers to curate a robust classifier became pivotal.Its iterative feedback loop, emphasizing harder-toclassify instances and adjusting weights to improve classification accuracy, offered an adept approach to classifying EEG signals into stress, anxiety, or neutral states.The continuous refinement and fine-tuning of AdaBoost underscored its superiority in handling the intricacies of EEG data.
In summary, the journey from raw EEG data to a nuanced understanding of emotional states has been both intricate and enlightening.Combining preprocessing methods, advanced deep learning models, and adaptive classifiers like AdaBoost showed how EEG data could be used in medical and therapeutic research.As the domain of EEG-based emotion classification expands, the techniques and algorithms outlined in this investigation will inevitably serve as foundational pillars for future research and applications.
The current evaluation utilizes DEEP, SEED, and DASPS datasets.In future iterations, we will train and test EmotionNet on a broader array of datasets to ensure its universality across different demographic and cultural backgrounds.There is potential to integrate EmotionNet into real-time monitoring systems, such as wearable technology, to provide constant mental health feedback and alert individuals or healthcare providers to deteriorating emotional states.While the current accuracy of EmotionNet is commendable, there is always scope for enhancement.Future endeavors can look into refining model parameters, exploring other architectures, or incorporating transfer learning for improved accuracy.EmotionNet's architecture could be adapted to predict a broader spectrum of emotions, expanding its utility in diverse applications, while still maintaining the current focus on stress and anxiety.
In summary, while EmotionNet stands as a significant stride in EEG-based emotion recognition, the journey forward promises further innovation, refinement, and meaningful societal impacts.

VI. CONCLUSION
The presented work introduces "EmotionNet," a novel deep learning system adept at predicting stress and anxiety levels through EEG signal analysis.The integration of convolutional neural networks (CNN) and long-short-term memory (LSTM) networks serves as a significant advancement in EEG-based emotion recognition.The fact that EmotionNet can achieve a classification accuracy of 98.6% shows how well it works.This is possible by using signal decomposition, preprocessing, and the CNN-LSTM architecture for feature extraction.Furthermore, evaluation of well-regarded datasets like DEEP, SEED, and DASPS reinforces its robustness and reliability in predicting emotional states.EmotionNet not only epitomizes technical progression in the domain but also underscores the broader societal imperative of understanding and prioritizing mental health, especially in times of global challenges like the COVID-19 pandemic.
5 hertz.It is a normal occurrence in children from 0 to 13 years old, but it indicates sub-cortical lesions, hydrocephalus, or metabolic encephalopathy.The brain exhibits a beta signal when it is aroused and actively engages in activities.It has a frequency of 14 to 35 hertz.Gamma signals indicate that an individual has attained peak concentration and help in information processing.It has a frequency of 35 hertz or more.

Fig. 7 .
Fig. 7. Loss and accuracy of the proposed EmotionNet model, where Fig.7 (a) shows the loss curve and, (b) shows the accuracy curve with 300 epochs.

Fig. 7
Fig.7appears to present a detailed analysis of the performance metrics for the EmotionNet model for 300 epochs.Fig.7(a) likely to illustrates the loss curve, which is a graphical representation of how the model's prediction error decreases over time as it learns from the training data.This curve is crucial to understanding how effectively the model is learning and optimizing its parameters.A typical loss curve would show a downward trend, indicating that the model is becoming more accurate in its predictions.Fig.7(b) probably depicts the accuracy curve, showcasing how the model's prediction accuracy improves across the epochs.The model's proficiency in correctly classifying or predicting emotional states is expected to increase, resulting in an upward trend in this curve.Both of these curves together provide a comprehensive view of the model's learning dynamics and performance, with the loss curve focusing on error minimization and the accuracy curve emphasizing successful predictions.

Fig. 8 .
Fig. 8. Confusion matrix of different training and testing split ratios.

Fig. 9 .
Fig. 9.The confusion matrix of detection of stress and anxiety, where 0 shows the detection rate of stress and 1 represents the anxiety by proposed model EmotionNet. .

TABLE II .
STATE-OF-THE-ART COMPARISON