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.
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.
Some of the features used in model training include:
- Age
- Gender
- Height
- Weight
- Duration
- Heart Rate
- Body Temperature
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.txtIf you're on macOS and encounter errors related to protobuf, install it using Homebrew:
brew install protobufUse Calories_Burnt_Prediction.ipynb for the complete pipeline:
- Data loading
- Preprocessing
- Model training
- Evaluation
A web interface is provided via Streamlit for user input and calorie prediction.
- Activate your Python environment.
- Install dependencies:
pip install -r requirements.txt
- 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.
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.