Skip to content

Navigation Menu

Sign in
Sign up

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

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /