Giter Club home page Giter Club logo

medical-cost-prediction's Introduction

Medical Cost Prediction

Predicting medical costs of individuals based on different features using several ML (Regression) algorithms.

Dataset

The Medical Cost Prediction consists of around 1300 records and six independent variables along with charges target variable:

  1. age: Age of the individual

  2. children: Number of children the individual has

  3. bmi: Body Mass Index of the individual - where bmi <18.5 falls under underweight range, 18.5 - 24.9 falls under normal range, 25.0 - 29.9 falls under overweight range, and >30.0 falls under obese range

  4. sex: Sex of the individual - Male or Female

  5. smoking: Whether the individual is a smoker or not

  6. region: What region the individual belongs to - Northeast, Northwest, Southeast, Southwest

Getting Started (Cloning)

Clone the repo using

git clone https://github.com/rohitmtak/medical-cost-prediction.git

Installation Steps

Install the required packages from requirements.txt after commenting out -e . which runs setup.py automatically.

pip install -r requirements.txt

Usage

  1. Once cloned, run the data_ingestion.py script to load, transform, and train different ML algorithms (Regression) on loaded data. This script creates all the required artifacts (train, test, validation data, model, and preprocessor pickle files).

Model.pkl will have the best model with the best parameters from different models used.

python src/components/data_ingestion.py
  1. Run the app.py which is a Flask application to get the required UI locally.
python app.py

And, that's it, the application should run perfectly on local machine, and you can test the UI out and play with it.

Github:

https://github.com/rohitmtak

Contact

Rohit Tak - [email protected]

medical-cost-prediction's People

Contributors

rohitmtak avatar

Watchers

 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.