0% found this document useful (0 votes)
22 views23 pages

Batch 20 Mini

Uploaded by

krish191210
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)
22 views23 pages

Batch 20 Mini

Uploaded by

krish191210
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/ 23

Department of Information Technology

V R Siddhartha Engineering College

StressSense: An AI-Powered Stress Assessment


Application
MINI Project Review Presentation

Presented by
M.Teja(218W1A1239)
B.Bhargavi(228W5A1203)

Under the guidance of


K.Madhavi
Introduction

 Stress is a complex phenomenon that can have a impact on individuals'


daily lives, affecting their physical health, emotional well-being.

 Early detection of stress by using the advanced technologies like


Machine Learning and Data Analytics etc.,
Problem Statement

To develop a stress assessment tool which utilizes the Machine


Learning algorithms to predict the individual’s stress levels based on
their responses to a set of predefined questions
Objectives

 Developing a user-friendly tool for stress assessment.

 Implement a mechanism to capture the answers provided by the users.

 Utilize machine learning algorithms to analyze user responses and predict


the stress Levels.
Outcomes

 The interface presents stress assessment questions in a clear and organized


manner.
 Backend functionality is implemented to receive and process user responses
submitted through the web interface
 Predicted stress levels are categorized into distinct levels (e.g., low, moderate,
high) to provide meaningful insights to users.
Literature Review
Publication Details Datasets Algorithms Used Purpose Remarks
/ Technologies
Used
[1] Computer assisted Datasets are Naïve Bayes , psychological features Accuracy is
identification of stress, Sample of LogisticRegression, generated through low,All the result
anxiety, depression (SAD) in questionnaire DecisionTree, PCA, various body parts to is selfaddressed
students: A state-of-the-art dataset K nearest neighbour identify psychological and may
review - 2022 activities and symptoms contain bias ,The
of stress, anxiety, and study is time
depression in student life. consuming

[2] A survey of machine These datasets SVM, PNN, The purpose of this Sophisticated
learning techniques in are used Real Multilayer project is to conduct a techniques of
physiology based mental data, MAHNOB Perceptron (with comprehensive survey on signal processing
stress detection systems - and DEAP. one hidden layer), machine learning are required
2019 SVM (using Pearson techniques in physiology- to extract patterns
Kernel function) based mental stress
detection.
Literature Review
Publication Details Datasets Algorithms Used Purpose Remarks
/ Technologies
Used
[3] Stress Detection stress detection where Support Vector Purpose machine learning Machine learning
Using Machine the data set is Machine, Logistic algorithms for predicting algorithms for
Learning collected from the Regression, stress levels and stress detection
Algorithms(2020) website where collect Random Forest, K- understanding the impact of offer a promising
the statistical data and nearest neighbor stress on individuals' solution for mental
also consider the behavior and health. health issues,
attributes for the requiring
datase interdisciplinary
[4] Mental Stress The dataset was taken Random Forest , aims to correlate the stress Interdisciplinary
Detection in University from the 206 students Naïve- Bayes , levels with the time spent on Collaboration has
Students using of Jaypee Institute of K-Nearest the internet, providing Projects like these
Machine Learning Information Neighbour, insights into the relationship often require
Algorithms – 2019 Technology Noida. Svm. between internet usage and collaboration
mental stress. between experts in
machine learning,
psychology.
Literature Review
Publication Details Datasets Algorithms Used Purpose Remarks
/ Technologies
Used
[5] Stress detection Te dataset to train our Logistic Regression, The paper aims to The "Stress Detection
using natural language ML model for binary Decision Trees, and leverage social media Using Natural
processing sentiment analysis has Random Forest. content and apply Language Processing
and machine learning 100042 tweets.the machine learning and and Machine Learning
over social dataset which we deep learning Over Social
interactions- 2022 utilize possesses three techniques to predict Interactions" project
columns: ‘id’, the emotional state of uses natural language
‘sentiment label’, and users, detect stress, processing and
‘sentiment text’. and analyze social machine learning
issues
Literature Summary
• The literature review explores computer-assisted stress identification in
students, highlighting its impact on academic performance, mental health,
and overall well-being.
• It discusses various technological solutions, such as mobile applications,
wearable devices, and online platforms, and their assessment methods.
• The review also reviews the efficacy of stress management interventions,
including mindfulness-based techniques and biofeedback techniques.
• Challenges include user engagement, privacy concerns, and scalability,
and suggests future research directions for integrating advanced analytics
and artificial intelligence.
Dataset Description
• Dataset Characteristics :Multivariate
• Dataset Type : Comma Separated Values
• Number of Instances : 16151
• Number of Attributes : 10
• Associated task : Classification ( Stress Level )

https://www.kaggle.com/datasets/ydalat/lifestyle-and-wellbeing-data
Requirements
• Jupyter notebook
• Machine learning libraries ( sklearn )
• Front end : HTML, CSS, Javascript
• Backend : Flask
• Visual studio code
Architecture Diagram
Input Data Preprocessing Preprocessed Data

Data cleaning,Label
Survey data
Encoding etc.,
Testing Dataset
Training Dataset
Model
Training

Model
Testing
jModel
Severe Stress Evaluation Machine
Learning
Moderately
Model
Severe Stress Sending Predictions
Moderate Stress to application

Mild Stress User responses

Stress Assessment Responses send to


No Stress Application ML model
Algorithms Used
Random Forest:
• Random Forest is an ensemble learning method that combines multiple decision
trees to improve predictive performance and control overfitting.
• It builds a collection of decision trees, each trained on a random subset of the data
and using a random subset of features.

SVM:
• Support Vector Machine or SVM is one of the most popular Supervised
Learning algorithms, which is used for Classification as well a Regression
problems.
• SVM aims to find the optimal hyperplane that separates data points into
different classes while maximizing the margin between classes
Random Forest
Input:
 Number of classifiers c, which is the total number of decision tree classifiers to be generated.
 Training data D, the dataset used for training the classifiers.
 Percentage of features to consider x%, The percentage of features randomly selected for each decision tree.
Output: c number of decision tree classifiers that is random forest.
Method:
To generate C classifiers :
for i = 1 to C do
Randomly sample the training data D with replacement to produce Di
Create a root node, Ni containing Di
Call BuildTree(Ni)
end for
BuildTree(Ni):
if N contains instances of only one class, then
return
else
Randomly select x% of the possible features in N
Select the feature F with the highest information gain to split on
Entropy 𝑆 ≡ σ𝑐𝑖=1 −𝑝𝑖 log 2 𝑝𝑖
𝑆𝑣
𝐺𝑎𝑖𝑛 𝑆, 𝐴 ≡ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑆 − ෍ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑆𝑣
𝑆
𝑣∈ Values 𝐴

Create f child nodes of N, N1, …., Nf , Where F has f possible values (F1, … , Ff)
for i = 1 to f do
Set the contents of Ni to Di is all instances in N that match Fi
Call BuildTree(Ni)
end for
end if
SVM Algorithm:
Input:
- Training dataset (X_train, Y_train)
- Regularization parameter (C)
- Kernel type (linear, polynomial, radial basis function (RBF), etc.)
- Kernel parameters (degree for polynomial kernel, gamma for RBF kernel, etc.)
Output: Trained SVM model
Algorithm:
1. Initialize random weights (w) and bias (b) .
2. Define the kernel function K(x, xi) based on the selected kernel type.
Training:
3. For each training sample (xi, yi) in X_train:
a. Calculate the decision function for sample xi:
f(xi) = w * xi + b
b. Compute the loss L(w, b) using the hinge loss function:
L(w, b) = 1/2 * ||w||^2 + C * Σ(max(0, 1 - yi * f(xi)))
c. Update weights and bias using gradient descent to minimize the loss:
w = w - η * (∂L/∂w + λ * w)
b = b - η * ∂L/∂b
where η is the learning rate and λ is the regularization parameter
4. Repeat steps 3a-3c until convergence or a maximum number of iterations.
Prediction:
5. Given a new test sample x_test:
a. Calculate the decision function for x_test:
f(x_test) = w * x_test + b
b. Predict the class label using the decision function:
if f(x_test) >= 0:
predicted_class = 1
else:
predicted_class = -1

Output:
6. Output the trained SVM model with weights (w) and bias (b).
Implementation Details
Step 1:- Dataset Collection and Preparation:
• Preprocess the dataset by handling missing values, encoding categorical variables
Step 2:- Model Selection:
• Choose appropriate machine learning algorithms for stress level prediction, such as decision trees,
random forests, support vector machines (SVM)
Step 3:- Training-Validation Split:
• Split the dataset into training and validation sets to assess model performance.
Step 4:- Model Evaluation:
• Evaluate the trained models on the validation set using relevant evaluation metrics such as accuracy,
precision, recall, F1-score
Step 5:- Model Integration:
• Trained machine learning model using a library like pickle or joblib to save them as files.
• Integrate the model into the backend of the stress assessment tool using Flask or another web framework.
Results

Random Forest Classification Report SVM Classification Report


Results

Random Forest Confusion Matrix SVM Confusion Matrix


Results
Results
References
• Sharma, Samriti, Gurvinder Singh, and Manik Sharma. "A comprehensive review and
analysis of supervised-learning and soft computing techniques for stress diagnosis in
humans." Computers in Biology and Medicine 134 (2021): 104450.
• Gedam, Shruti, and Sanchita Paul. "A review on mental stress detection using wearable
sensors and machine learning techniques." IEEE Access 9 (2021): 84045-84066.
• Panicker, Suja Sreeith, and Prakasam Gayathri. "A survey of machine learning techniques in
physiology based mental stress detection systems." Biocybernetics and Biomedical
Engineering 39.2 (2019): 444-469.
• Panicker, Suja Sreeith, and Prakasam Gayathri. "A survey of machine learning techniques in
physiology based mental stress detection systems." Biocybernetics and Biomedical
Engineering 39.2 (2019): 444-469.
• Li, Russell, and Zhandong Liu. "Stress detection using deep neural networks." BMC Medical
Informatics and Decision Making 20 (2020): 1-10.

You might also like