Skip to content

aeindri-tech/Fitness_Model

Repository files navigation

🏋️‍♂️ Active Session Predictor (Machine Learning Project)

A complete end-to-end Machine Learning project that predicts whether a gym session is Active or Not Active based on user fitness metrics. This project demonstrates core ML concepts including model building, evaluation, visualization, scaling, comparison, and hyperparameter tuning.


🚀 Project Overview

This project uses real-world inspired fitness data to classify whether a workout session is active (high calorie burn) or not. It is built using multiple ML techniques and provides insights through evaluation metrics and visualizations.


🎯 Objective

To predict whether a workout session is Active based on:

  • Age
  • Weight
  • Height
  • Session Duration
  • Average BPM (Heart Rate)

👉 A session is considered Active if:

Calories_Burned > 400

🧠 Machine Learning Concepts Used

  • Logistic Regression
  • Model Evaluation Metrics
  • Confusion Matrix & ROC Curve
  • Learning Curves (Overfitting Analysis)
  • Feature Scaling (StandardScaler, MinMaxScaler)
  • Model Comparison (KNN, Decision Tree, Random Forest)
  • Cross Validation
  • Hyperparameter Tuning (GridSearchCV)

📂 Project Structure

Fitness_Model/
│
├── fitness.py                # Basic Logistic Regression model
├── evaluation.py             # Evaluation metrics + Confusion Matrix + ROC Curve
├── overfitting.py            # Learning Curve (Overfitting/Underfitting analysis)
├── scaling.py                # Feature Scaling comparison
├── multiple_models.py        # Model comparison (Multiple algorithms)
├── tuning.py                 # Hyperparameter tuning (GridSearchCV)
│
├── gym_members_exercise_tracking_synthetic_data.csv   # Dataset
│
├── output_curves/            # Saved plots
│   ├── confusion_matrix.png
│   ├── roc_curve.png
│   └── learning_curve.png
│
├── README.md
├── requirements.txt
└── .gitignore

⚙️ Installation & Setup

  1. Clone the repository:
git clone https://github.com/aeindri-tech/Fitness_Model.git
  1. Navigate to the project folder:
cd Fitness_Model
  1. Install dependencies:
pip install -r requirements.txt

▶️ How to Run

Run any task file:

python fitness.py

You will be prompted to enter:

  • Age
  • Weight
  • Height
  • Session Duration
  • Average BPM

👉 The model will predict:

Active Session / Not an Active Session

📊 Model Outputs

📌 Confusion Matrix

Confusion Matrix

📌 ROC Curve

ROC Curve

📌 Learning Curve

Learning Curve


📈 Model Performance

  • Achieved high accuracy (~98%)

  • Evaluated using:

    • Accuracy
    • Precision
    • Recall
    • F1 Score
    • ROC-AUC

🔍 Key Learnings

  • Importance of data preprocessing
  • Effect of feature scaling on model performance
  • Comparing multiple models improves decision making
  • Cross-validation ensures model reliability
  • Hyperparameter tuning boosts performance

💡 Future Improvements

  • Deploy as a web app (Streamlit / Flask)
  • Add more features (Sleep, Diet, Steps, etc.)
  • Use advanced models (XGBoost, Neural Networks)
  • Improve dataset quality

📜 License

This project is licensed under the MIT License.


🙌 Author

Aeindri BTech CSE (AI) Student


⭐ Show Your Support

If you liked this project:

  • ⭐ Star the repository
  • 🍴 Fork it
  • 📢 Share it

🚀 Final Note

This project showcases a complete beginner-to-intermediate level Machine Learning workflow and is a strong step towards building real-world ML systems.

About

Machine learning project to predict whether a gym session is active using fitness data, featuring model evaluation, scaling, and hyperparameter tuning.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages