This repository contains a machine learning model to predict the number of calories burned based on input features such as age, gender, height, weight, heart rate, and duration of physical activity. This project was developed during the Edify Internship program.
The goal of this project is to accurately predict the calories burned during physical activities using personal metrics like age, gender, height, and heart rate. This project leverages Python libraries for data preprocessing and machine learning model building.
The dataset includes personal and exercise data with features like:
- Age
- Gender
- Height
- Weight
- Heart Rate
- Duration of Physical Activity
Dataset Source: [https://www.kaggle.com/code/muskanjha/calories-burnt-prediction/input]
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Karan27q/Edify-project.git
-
Navigate to the project directory:
cd Edify-project -
Install the required dependencies:
pip install -r requirements.txt
Once the dependencies are installed, follow these steps:
- Preprocess the data: Clean and preprocess the dataset.
- Train the model: Run the following command to train the model:
python train.py
- Make predictions: Use the trained model to make predictions on new data:
python predict.py --input new_data.csv --output predictions.csv
The models used include:
- RandomForestRegressor and LinearRegression for predicting continuous values.
The model is evaluated using performance metrics such as Mean Squared Error (MSE) and Mean Absolute Error (MAE).
The model achieves an R-squared score of 93% on the test dataset, with detailed results on accuracy and error metrics.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements.