|
| 1 | +# Stress Level Detection |
| 2 | +- The Stress Level Detection project aims to predict stress levels based on various physiological and demographic features using machine learning algorithms. |
| 3 | +- The dataset used in this project contains information on individuals, including their age, heart rate, sleep hours, and gender. |
| 4 | +- The goal is to classify individuals into different stress levels using models such as Logistic Regression, Random Forest, and Support Vector Machines (SVM). |
| 5 | + |
| 6 | +## Prerequisites |
| 7 | +- Python |
| 8 | +- Pandas |
| 9 | +- NumPy |
| 10 | +- Seaborn |
| 11 | +- Matplotlib |
| 12 | +- Scikit-learn |
| 13 | +- Imbalanced-learn |
| 14 | + |
| 15 | +To install: `pip install pandas numpy seaborn matplotlib scikit-learn imbalanced-learn` |
| 16 | + |
| 17 | +## Dataset |
| 18 | +The dataset used for this project is a CSV file named `stress_data.csv`, which includes the following columns: |
| 19 | +- `Gender`: Gender of the individual (categorical) |
| 20 | +- `Age`: Age of the individual (numerical) |
| 21 | +- `HeartRate`: Heart rate of the individual (numerical) |
| 22 | +- `SleepHours`: Number of hours the individual sleeps (numerical) |
| 23 | +- `StressLevel`: Level of stress (categorical, target variable) |
| 24 | + |
| 25 | +# Usage |
| 26 | +- Mount your Google Drive to access the dataset. |
| 27 | +- Load the dataset using Pandas. |
| 28 | +- Perform data cleaning, including handling missing values. |
| 29 | +- Encode categorical variables and normalize numerical features. |
| 30 | +- Split the data into training, validation, and test sets. |
| 31 | +- Conduct exploratory data analysis (EDA) to visualize data distributions and correlations. |
| 32 | +- Train models using Logistic Regression, Random Forest, and SVM. |
| 33 | +- Evaluate the models using classification reports and accuracy scores. |
| 34 | +- Use SMOTE to address class imbalance and re-evaluate the models. |
| 35 | + |
| 36 | +# Results |
| 37 | +- Logistic Regression, Random Forest, and SVM models were trained and evaluated. |
| 38 | +- SMOTE was applied to balance the dataset, resulting in improved accuracy for the SVM model. |
| 39 | + |
| 40 | +# Conclusion |
| 41 | +This project demonstrates the process of detecting stress levels using machine learning techniques. |
0 commit comments