Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created README file for Stress Level Detection project #1564

Merged
merged 4 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Detection Models/Stress Level Detection/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Stress Level Detection
- The Stress Level Detection project aims to predict stress levels based on various physiological and demographic features using machine learning algorithms.
- The dataset used in this project contains information on individuals, including their age, heart rate, sleep hours, and gender.
- The goal is to classify individuals into different stress levels using models such as Logistic Regression, Random Forest, and Support Vector Machines (SVM).

## Prerequisites
- Python
- Pandas
- NumPy
- Seaborn
- Matplotlib
- Scikit-learn
- Imbalanced-learn

To install: `pip install pandas numpy seaborn matplotlib scikit-learn imbalanced-learn`

## Dataset
The dataset used for this project is a CSV file named `stress_data.csv`, which includes the following columns:
- `Gender`: Gender of the individual (categorical)
- `Age`: Age of the individual (numerical)
- `HeartRate`: Heart rate of the individual (numerical)
- `SleepHours`: Number of hours the individual sleeps (numerical)
- `StressLevel`: Level of stress (categorical, target variable)

# Usage
- Mount your Google Drive to access the dataset.
- Load the dataset using Pandas.
- Perform data cleaning, including handling missing values.
- Encode categorical variables and normalize numerical features.
- Split the data into training, validation, and test sets.
- Conduct exploratory data analysis (EDA) to visualize data distributions and correlations.
- Train models using Logistic Regression, Random Forest, and SVM.
- Evaluate the models using classification reports and accuracy scores.
- Use SMOTE to address class imbalance and re-evaluate the models.

# Results
- Logistic Regression, Random Forest, and SVM models were trained and evaluated.
- SMOTE was applied to balance the dataset, resulting in improved accuracy for the SVM model.

# Conclusion
This project demonstrates the process of detecting stress levels using machine learning techniques.
Loading