Voting Classifier Based Model For Mental Stress Detection and Classification Using EEG Signal
Voting Classifier Based Model For Mental Stress Detection and Classification Using EEG Signal
Stress is classified into two categories namely, routine In [10]; the researchers examine the use of EEG for
stress and chronic stress. Routine stress induces inefficiency predicting people's stress levels without manual
and makes it a social cause while chronic stress adversely intervention and recording through BCI (Brain-Computer
affect the anxiety and bipolar diseases. It is also well proved Interface). The efficiency of SVM and KNN Machine
fact that physical health is also affected by mental stress [2]. learning algorithms is evaluated. A training set, target class
At the present, the main cause of most medical conditions is allocated by a stress value derived from the PSS-14 (Full
is mental stress. These comprise strokes, heart attacks, form of PSS) questionnaire response. Using the KNN
depression, nervousness, PTSD (Post-Traumatic Stress algorithm, the maximum average classification accuracy is
Disorders) and immunological disorders [3-4]. Counselling 74.43%. Author confirmed that band power ratios of
is a conventional method to detect stress in human but this different bands are correlated to the stress level of subjects
suffers from a disadvantage that it requires a person to be from measured EEG signals in the front part of the brain.
able to speak frankly. Stress can also affect the activity and
structure of the brain. The study of brain activity is In [11]; Signals coming from the human brain frontal
necessary for the early detection of stress to avoid disease, lobe are used for stress measurement. The brain waves of
and to decrease the risk of brain damage [5]. the thirty subjects are recorded with five different levels of
stress: relaxed, stressed less, stressed moderately, stressed
EEG is one of the most accurate measurement of higher, and stressed alarmingly. Preprocessing of the
electrical activity in the brain. The voltage changes in the recorded EEG signal is followed by the feature extraction.
Manuscript received November 5, 2024
Manuscript revised November 20, 2024
https://doi.org/10.22937/IJCSNS.2024.24.11.12
114 IJCSNS International Journal of Computer Science and Network Security, VOL.24 No.11, November 2024
2. Methodology
The purpose of this paper is to use the auxiliary
classifier, a more efficient voting classifier to classify the
EEG signals into healthy and unhealthy EEG signal. The
used auxiliary classifier is based on the KNN and RF
classifier to increase the accuracy of the current model for a
greater number of datasets. A computer-aided diagnostic Fig 1. Flow chart of the proposed method
tool is highly required to help people to diagnose stress and
to suggest proactive action to minimize stress. In the 2.1 Fast Fourier Transform (FFT)
proposed method; FFT is used to generate the periodogram FFT is used to transform the signal from time domain
of input EEG signal. PSD vector value from periodogram to frequency domain [15]. The FFT is called the
has been calculated and used as an input to the proposed computationally efficient implementation of the DFT
voting classifier. The block diagram of the proposed method, described in a set of N samples 𝑥 as follows:
methodology is shown in Fig. 1.
∑ /
𝑋 𝑥 ∗𝑒 ,𝑘 0,1,2, … . . , 𝑁 1
(1)
Theta, delta, alpha, gamma and beta are the used in the
experiment for analysis. The delta wave can calculate the
depth of the sleep, and its frequency (1-4Hz). Delta wave
can be identifying the slow-wave sleep using EEG, in slow-
wave sleep brain waves are very slow so this is called
dreamless sleep, and Dreams occurred very often.
Nightmares occur during this sleep but, we are not able to
recall the dreams. The following rates are decreasing during
this sleep BP, respiratory rate, and BMR. Theta wave can
be used to know the functions of the brain, which means
that the difficult task of the brain and it's associated with the
weakness level. The frequency is about (4-7Hz), Theta is
connected with all-around cerebral processing such as Fig 4. Plot of Cumulative sum of data frame of group 2 against
memory conceal and cognitive workload, it is also samples
calculating the tired level of humans. Alpha denotes our
mind-released state, and it records the relaxation of the Fig. 5 represents a scatter plot of cumulative sum of
brain whenever we closed our eyes, we turn into a calm state data frames for both groups after removing the gamma
at that time alpha wave take over, and it is related to shyness waves because it will not affect the accuracy of our model.
and attention, the frequency of alpha is (7-12Hz). Beta Fig. 6 and Fig. 7 shows the histogram plot of the cumulative
waves with frequencies of (12-30Hz). It can notice the body sum of data frames for the 1st and 2nd group respectively.
movements, such as limp movement fore limp (hand) hind
limp (leg), this increases in beta also perceptible as we
notice bodily movements of other peoples. Human brains
imitate the movements of their limbs and indicating the
mirror neuron system. The Gamma waves, typically the
gamma frequency is (>30Hz to 40Hz). Gamma waves can
give information about our sensory inputs. These waves are
similar to the REM (rapid eye movement). All the instances
were used to assess at a point during this process and the
remaining instances were utilized to the training of the
classifier [21].
Fig 3. Plot of Cumulative sum of data frame of group 1 against Fig 6. Histogram plot of Cumulative sum of data frame of group 1
samples
IJCSNS International Journal of Computer Science and Network Security, VOL.24 No.11, November 2024 117
4. Conclusion
The work present in this paper proposed a method
to detect and classify stress using EEG signals. It is based
on the features extracted from the EEG waves Delta, Alpha,
Beta, Theta, and Gamma. A voting classifier model is used
in the proposed method to successfully detect stress at
different levels. EEG signal is subjected to FFT to generate
periodogram waves which used to generate the PSD vector.
PSD vector is used as an input to the proposed auxiliary
voting classifier. The voting classifier used in the
experiment is based on KNN and RF. Experimental results
Fig 7. Histogram plot of Cumulative sum of data frame of group 2
have found that the proposed voting classifier model is
better than the previous KNN classifier model in terms of
Comparative analysis of results of the proposed
accuracy and MSE. It has achieved 88.58% accuracy and
method with the existing method. Mean square error (MSE)
11.42% mean squared error. The main contribution of the
and accuracy is used as a performance parameter of the
paper is the use of voting classifier to detect and classify
proposed method. It is proved from the Table 1 that the
stress. In future work, we can use other biomedical signals
proposed method performs better in terms of performance
such as ECG, EMG etc. to detect the stress using the same
parameter with respect to existing methodology. The
methodology. Moreover, intervention and sensitivity
comparative study between the proposed methodology and
analysis methods on EEG signals can also be added to
existing methods is also shown graphically in Fig. 8 and Fig.
determine the stress level.
9 for MSE and accuracy respectively.