0% found this document useful (0 votes)
27 views6 pages

Stress Detection Based On Naïve Bayes Algorithm

: Stress is a prevalent issue that affects individuals' mental and physical well-being, leading to various health problems. The use of machine learning (ML) has been gaining popularity as a tool for stress detection
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views6 pages

Stress Detection Based On Naïve Bayes Algorithm

: Stress is a prevalent issue that affects individuals' mental and physical well-being, leading to various health problems. The use of machine learning (ML) has been gaining popularity as a tool for stress detection
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

11 IV April 2023

https://doi.org/10.22214/ijraset.2023.50716
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue IV Apr 2023- Available at www.ijraset.com

Stress Detection Based on Naïve Bayes Algorithm


Sriyansh1, Sumit Kumar Upadhyay2, Yash Varshney3, Sreenu Banoth4
1, 2, 3
UG Student, Department of Computer Science and Engineering, IIMT College of Engineering,Greater Noida, Uttar Pradesh,
India
4
Assistant Professor, Department of Computer Science and Engineering, IIMT College ofEngineering, Greater Noida, Uttar
Pradesh, India

Abstract: Stress is a prevalent issue that affects individuals' mental and physical well-being, leading to various health problems.
The use of machine learning (ML) has been gaining popularity as a tool for stress detection. ML techniques have shown
promising results in identifying patterns and features from various physiological and behavioral data sources such as heart rate,
blood pressure, and speech signals. The primary goal of stress detection using ML is to provide accurate, non-invasive, and cost-
effective methods for early stress detection and intervention. Overall, stress detection using ML holds great promise in providing
an objective, efficient, and scalable approach for stress monitoring and intervention. Further research is required to address the
challenges associated with data collection, feature extraction, and model generalization to diverse populations and contexts.
Keywords: Machine Learning, Naïve Bayes, Data, Depression, Stress.

I. INTRODUCTION
Stress is a common and natural response to a wide range of environmental and personal factors, including work demands,
relationship issues, financial pressures, and health problems. It can be defined as a state of emotional or physical tension resulting
from an individual's perception of a situation as challenging or demanding. While short-term stress can be beneficial, helping
individuals cope with challenging situations, chronic or prolonged stress can lead to various health problems, including anxiety,
depression, cardiovascular disease, and immune system dysfunction. Stress is a complex phenomenon that involves multiple
interventions. In recent years, machine learning techniques have had physiological and psychological processes. In response to a
stressor, the body releases stress hormones, such as cortisol and adrenaline, which activate the sympathetic nervous system, leading
to physiological changes, such as increased heart rate, blood pressure, and respiration rate. These changes are designed to prepare
the body for a fight or flight response, enabling individuals to respond quickly to perceived threats. While stress is a common
experience, the subjective experience of stress can vary across individuals and contexts. Therefore, accurate and timely detection of
stress is critical for developing effective stress management strategies and has been explored as a tool for stress detection, leveraging
various physiological and behavioral data sources to identify patterns and features that can differentiate between stressed and non-
stressed states. This approach holds great promise in providing an objective, non-invasive, and cost-effective means of stress
monitoring and intervention. Stress is a psychological and physiological response to a challenging situation. It is a natural response
to a threat or danger, but when it becomes chronic and prolonged, it can have adverse effects on an individual's physical and mental
well-being. Stress can lead to various health problems such as hypertension, diabetes, depression, and anxiety. Early detection of
stress can help prevent these problems and improve the quality of life of individuals. Machine learning has emerged as a powerful
tool for stress detection due to its ability to learn patterns from large datasets.

II. RELATED WORK


The idea of a stress detection system will help doctors to predict stress levels using machine learning algorithms. The researchers
are proposing their work related to personal stress detection.
Reshma Radheshamjee et. al., [1] proposed a system as in this project the datasets are collected from social media. In recent times,
individuals who experience stress or depression often express their thoughts and emotions through quotes or images posted on
social media platforms such as Facebook or Twitter. One study collected data from Twitter posts and utilized a support vector
machine and Naïve Bayes algorithms to predict if a person is in a state of stress or depression. The analysis also involved
sentimental analysis to classify the data into stress, depression, and related categories. The use of additional techniques or
algorithms could potentially improve the results, with precision and recall values used as key indicators of success. To predict stress
and depression, the study employed a confusion matrix.
Limitations: The accuracy of the proposed system may not be completely precise due to the limitations of the Twitter dataset used in
the study.

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2510
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue IV Apr 2023- Available at www.ijraset.com

Alisha RM et. al., [2] proposed a system of safety measures taken for the girls. The proposed system aims to address the problem of
safety concerns faced by many women and girls today. In many parts of the world, cases of rape and assault are still prevalent in
real time.
To tackle this issue, a wearable device has been developed that uses various sensors such as an accelerometer, body temperature,
and Galvanic skin response to gather data. This device is meant to be worn by women when they go out, and the collected data is
storedin a database.
By analyzing the data, the system can identify when a woman is in danger, such as when she is running a high body temperature or
sweating more than usual. If the data values exceed a certain threshold, an alert message is sent to the relevant authorities or
persons, enabling them to take swift action and potentially save the woman's life.
Limitations: The accuracy of the values obtained in the proposed system may be affected by the devices’ limitations.

Wan-young Chung et. al., [3] proposed a system for stress detection by drivers. Nowadays we hear so much news as road accidents.
The driver will die due to the accident.
The driver will die in an accident if we don’t know what the problem is. When the driver sleeps or he is having some problem, he
will get into an accident.
The proposed system has used physiological devices where motion sensors, Galvanic skin response, and body temperature based on
these devices will collect the data, and that data should be stored in the database. When the driver gets sleeping or is not well based
on these values, we can predict the driver is having some problem andcan alert the driver. Based on the data we can alert the driver
as ringing the sound.
Limitations: The accuracy of the data collected by the devices used in the proposed system may be limited, which could potentially
impact the reliability of the results.

Purnendu Shekar Pandey et. al., [4] proposed a system of stress detection based on machine learning. The prediction of stress levels
based on heart rate and electrocardiogram values may vary depending on the person's age and other individual factors. By taking
these personal characteristics into account, the system can more accurately detect and analyze the level of stress experienced by the
person.
Limitations: The proposed system aims to predict stress levelsby analyzing heart rate and electrocardiogram (ECG) data.

Madhavi Ganapathiraju et. al., [5] proposed a system that monitors stress by physiological devices. Physiological devices such as
Galvanic skin response, body temperature, pulse rate, and motion sensors can provide accurate measurements, allowing us to
monitor an individual's health and stress levels. This is particularly useful when we cannot determine a person's physical state from
outward appearances. The physiological device collects data and stores it in a database, where changes in the values over time can be
analyzed to detect any potential health problems or signs of stress.
Limitations: The proposed system involves gathering data from physiological devices and utilizing it to compute various values.

III. ARCHITECTURE DESIGN


1) Step 1: Data collection means collecting the data in my project I have used statistical datasets where I have considered the 6-
attribute based on these attributes we will collect the data.
2) Step 2: Data pre-processing where we will be cleaning the data and also see if any missing data is available in the values to be
checked.
3) Step 3: Feature extraction is done by the values where in the values we have encoded the values mean the original data is
encoded into an unreadable format. Because so many people are hacking the information the hacking will lose all the
information.
4) Step 4: We have extracted the features by some of the algorithms are decision trees having root nodesand sub-nodes, when we
consider in my project the root node is the dataset further it is divided into sub-nodes as attributes, and the attributes are divided
into trained data and compare with a threshold value that value predicts the person is in stress or not stress, Naïve Bayes is
used for probability classification we calculating the problems based on assumptions and probability and K-Nearest Neighbor is
used for classification technique and predicts the nearest neighbor in the data.
5) Step 5: The dataset is divided into a training dataset and a testing dataset, always the training dataset is more than the testing
dataset.

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2511
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue IV Apr 2023- Available at www.ijraset.com

6) Step 6: Based on the trained value we will test the result as 0 is not stressed and 1 is stressed. When we consider the trained
value, we have to compare it with the threshold value based on these values we can predict and detect whether the person is in
stress or not stressed.

Fig. Project Flow Chart

IV. ALGORITHM
A. Naïve Bayes Classifier
Naïve Bayes is a supervised machine learning algorithm used to solve classification problems. It is the simplest classification
algorithm. This algorithm is based on Bayes Theorem.
The formula of Baye’s theorem is- P(A|B) = P(B|A) * P(A) / P(B).
This algorithm easily detects the stress and gives the result in binary form. [1] means Stress,[0] means Stress.

V. CONCLUSION
The proposed system has the potential to predict individuals who are experiencing stress, which can be a valuable tool for society
to address the significant issue of stress. By analyzing heart rate, Galvanic skin response, andrespiratory sensor data, the system can
determine stress levels and take necessary measures to reduce them. The Naïve Bayes algorithm was used to achieve accuracy, and
an algorithm was tested to obtain optimal results. Data were divided into training and testing sets and compared against threshold
values to determine stress levels and whether the person is stressed or not.

VI. FUTURE ENHANCEMENT


To enhance the future potential, a hardware modulewith a controller will be incorporated to exhibit real-time readings obtained from
sensors measuring heart rate, Galvanic Skin Response, and respiratory function, anddisplay results relevant to the individual's state.

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2512
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue IV Apr 2023- Available at www.ijraset.com

REFERENCES
[1] Reshma Radheshamjee and Supriya Kinariwala Detection and tress using Machine Learning Techniques” International Journal of Engineering and Advanced
Technology, pp. 2249-8958, 2019.
[2] Anand Jatti, Madhvi Kannan, Alisha R.M, Vijayalakshmi P, Shrestha Sinha, Design and Development of an IOT based Wearable device for the
safety and security of women and girl children.” International conference on recent trends in electronics information communication technology, 2016.
[3] Boon Giin Lee, Wan-Young Chung “Wearable Glove- Type Driver Stress Detection Using a Motion Sensor,” IEEE Transaction on Intelligent Transportation
Systems,” 2018.
[4] Purnendu S h e k h a r Pa n d e y , “ M a c h i n e L e a r n i n g a n d I oT for Prediction and Detection of Stress,” 2017.
[5] Lavanya Rachakonda, Prabha Sundaravadivel, Saraju P. Mohanty, Elias Kougianos, Madhavi Ganapathiraju, “A smart sensor in the IoMT for stress level
detection.

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2513

You might also like