Skip to content

harshini202005/LinearRegression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calories Burned Prediction Model

This model uses a Simple Linear Regression algorithm to learn the relationship between exercise duration and calories burned, and it is deployed via a Flask web application.


Features

  • Predict calories burned from exercise duration in minutes.
  • Clean and simple code structure.
  • Trained with Linear Regression for interpretability.
  • Flask web interface for easy user interaction.
  • Model stored using pickle for reusability.

Project Structure

CaloriesBurned-Prediction/
│
├── model.py            
├── app.py               
├── templates/
│   ├── index.html        
│   └── result.html       
├── static/
│   └── style.css         
├── calories.csv          
├── model.pkl             
├── README.md             
└── requirements.txt      

Installation

  1. Clone the repository:

    git clone https://github.com/harshini202005/LinearRegression.git
    cd LinearRegressor
  2. Install dependencies:

    pip install -r requirements.txt

Dataset

The dataset contains the following columns:

  • Minutes: Duration of exercise in minutes.
  • CaloriesBurned: Total calories burned during the exercise.

Example:

Minutes CaloriesBurned
5 25
10 50
15 75

Model Training

Run the following command to train and save the model:

python model.py

This will:

  • Load the dataset.
  • Train the Linear Regression model.
  • Save the trained model as model.pkl.

Running the App

Start the Flask server:

python app.py

Open your browser and go to:

http://127.0.0.1:5000

Screenshots

Web App Screenshot prediction


Requirements

  • Python 3.8+
  • Flask
  • Pandas
  • NumPy
  • Scikit-learn

Install all dependencies using:

pip install -r requirements.txt

Live Demo

You can try the model here: Calories Predictor Web App

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors