Skip to content

Latest commit

 

History

History

readme.md

Healthy Lifestyle Classification

This project uses the Healthy Lifestyle Dataset to classify individuals as healthy or unhealthy based on their lifestyle habits.
We build an ML pipeline that includes preprocessing, data balancing, and model selection with cross-validation.


📂 Dataset

  • Source: Healthy Lifestyle Dataset on Kaggle
  • Description: Contains lifestyle-related features such as:
    • Physical Activity
    • Sleep Patterns
    • Diet Habits
    • Stress Levels
    • Smoking & Alcohol Consumption
      along with a target variable indicating health status.
  • Task: Binary classification — Healthy vs Unhealthy.

⚙️ Features of the Project

  1. Pipeline with Imbalanced Learning
    • Used imblearn.Pipeline to chain together transformations, balancing, and classification.
  2. Data Preprocessing
    • Applied transformations (TF) for handling categorical and numerical data.
  3. Class Balancing
    • Used SMOTEN or similar balancing technique to handle class imbalance.
  4. Model Selection
    • Compared:
      • RandomForestClassifier
      • AdaBoostClassifier
      • XGBClassifier
  5. Hyperparameter Tuning
    • Implemented GridSearchCV with multiple parameter grids.
  6. Model Evaluation
    • Performed 5-Fold Cross-Validation for reliable performance estimation.
    • Calculated mean accuracy across folds.
    • Generated Confusion Matrix and Classifiaction report
  7. Final Prediction
    • Trained the best model on the full training data and generated predictions on X_test.

🛠️ Installation

# Clone this repository
git clone https://github.com/Fatimibee/PyVerse
cd Machine Learning
 

# Install dependencies
pip install -r requirements.txt