π€ Sleep Quality Prediction
π Project Overview This project aims to predict sleep quality (Good/Bad) based on various lifestyle and health factors using Logistic Regression. The model is trained on the Sleep Health and Lifestyle Dataset, and it is deployed using Streamlit for an interactive user experience.
π― Objective
The goal of this project is to analyze the impact of different lifestyle habits (such as physical activity, stress level, and sleep duration) on sleep quality and build a predictive model to classify sleep quality as Good or Bad.
π Dataset Used
Dataset Name: Sleep Health and Lifestyle Dataset
Features:
Age
Gender
Occupation
Sleep Duration
Physical Activity Level
Stress Level
BMI Category
Heart Rate
Daily Steps
Sleep Disorder
Target Variable: Sleep Quality (Good/Bad)
π Model Chosen
Logistic Regression: Selected due to its efficiency in binary classification tasks.
π¬ Data Preprocessing
Handling Missing Values
Encoding Categorical Variables using LabelEncoder
Feature Scaling using MinMaxScaler
Train-Test Split (80% training, 20% testing)
π Performance Metrics Accuracy Score
Confusion Matrix
Classification Report (Precision, Recall, F1-score)
π Deployment The model is deployed using Streamlit for a user-friendly interface where users can input their parameters and get sleep quality predictions.
π Check out the live Streamlit app: Sleep Quality Prediction
How to Run Clone the repository:
bash Copy Edit git clone https://github.com/your-username/sleep-quality-prediction.git cd sleep-quality-prediction