Skip to content

dhruvicious/CalorieBurntPrediction

Repository files navigation

Calories Burnt Prediction using XGBoost

Overview

This project predicts the number of calories burnt during physical activity using the XGBoost machine learning algorithm. It processes a dataset containing various biometric and activity-related features to train a regression model.

Dataset

The dataset includes the following CSV files:

  • exercise.csv: Contains features such as heart rate, duration, and type of physical activity.
  • calories.csv: Contains the corresponding number of calories burnt for each exercise session.

Features Used

Some of the features used in model training include:

  • Age
  • Gender
  • Height
  • Weight
  • Duration
  • Heart Rate
  • Body Temperature

Dependencies

Ensure the following Python packages are installed:

  • Python 3.x
  • pandas
  • numpy
  • xgboost
  • scikit-learn
  • streamlit (for the web interface)

To install all dependencies at once, use:

pip install -r requirements.txt

Additional Setup for macOS

If you're on macOS and encounter errors related to protobuf, install it using Homebrew:

brew install protobuf

Usage

Option 1: Run in Google Colab

Use Calories_Burnt_Prediction.ipynb for the complete pipeline:

  • Data loading
  • Preprocessing
  • Model training
  • Evaluation

Option 2: Run Web App Locally Using Streamlit

A web interface is provided via Streamlit for user input and calorie prediction.

  1. Activate your Python environment.
  2. Install dependencies:
    pip install -r requirements.txt
  3. Run the Streamlit app:
    streamlit run calories_app.py

This launches a browser-based UI where you can enter values and view predicted calories burnt.

Files

  • README.md: This file.
  • Calories_Burnt_Prediction.ipynb: Google Colab notebook containing preprocessing, training, and evaluation code.
  • calories_app.py: Streamlit script for launching the web-based prediction interface.
  • requirements.txt: List of required Python packages.

About

Calorie prediction using biometrics and ML for fitness.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors