Giter VIP home page Giter VIP logo

axewhyzed / life-expectancy-prediction-model-using-flask Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 167 KB

This repository contains code for a life expectancy prediction system using linear regression and Flask. The model is trained on a dataset of life expectancy data and is deployed on the web. Contributions are welcome.

License: MIT License

Python 26.50% HTML 73.50%
flask machine-learning python data-science linear-regression web-development life-expectancy prediction regression

life-expectancy-prediction-model-using-flask's Introduction

Life-Expectancy-Predictor-using-Linear-Regression-and-Flask

This project is a life expectancy prediction system that uses linear regression to predict life expectancy based on various factors such as adult mortality, alcohol consumption, percentage expenditure, Hepatitis B, Measles, Body Mass Index (BMI), Polio, total expenditure, Diphtheria, HIV/AIDS, Gross Domestic Product (GDP), population, income composition of resources, and schooling. The model is deployed on the web using Flask.

Code

The linear_reg.py script contains the code to generate the linear regression model. The script loads the Life Expectancy Data from a CSV file, drops unnecessary columns, and removes missing values. The remaining columns are used to train the linear regression model. The trained model is saved to a pickle file for later use.

The app.py script contains the code for the Flask deployment server. The trained model is loaded from the pickle file and used to predict life expectancy based on the user's input values. The predicted value is displayed on the web page.

Usage

To use this life expectancy prediction system, clone the repository and run the Flask app using the following command:

python app.py

Then, navigate to http://localhost:5000 in your web browser. Enter the required input values and click on the "Predict" button. The predicted life expectancy value will be displayed on the screen.

Dataset

The Life_Expectancy_Data.csv file used in this project is taken from Kaggle

Contributing

Contributions are always welcome! Please feel free to submit a pull request or open an issue if you find a bug or have a suggestion for improvement.

Support the Project

You can support the project by adding a star to it !

life-expectancy-prediction-model-using-flask's People

Contributors

axewhyzed avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.