Skip to content

This project aims to predict the type 2 diabetes, based on the dataset. It uses machine learning model,which is trained to predict the diabetes mellitus before it hits.

License

Notifications You must be signed in to change notification settings

Uttam580/diabetes_prediction_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub repo size GitHub language count GitHub top language GitHub last commit

Medium Blog:

Diabetes_prediction

In this project, the objective is to predict whether the person has Diabetes or not based on various features like Glucose level, Insulin, Age, BMI. We will use the Pima Indians dataset from the UCI Machine learning repository.

quick demo

demo_gif

we can predict diabetes from two ways.

  1. User will fill the data after that prediction will be displayed over UI.

  2. User can upload csv file with required features and then get downloadable predicted csv file.

    Below is screenshot for sample csv, while bulk prediction same features column sequence needs to be maintained in uploading file.

Description of variables in the dataset:

Pregnancies: Number of times pregnant

Glucose: Plasma glucose concentration a 2 hours in an oral glucose tolerance test

BloodPressure: Diastolic blood pressure (mm Hg)

SkinThickness:Triceps skin fold thickness (mm)

Insulin: 2-Hour serum insulin (mu U/ml)

BMI: Body mass index (weight in kg/(height in m)²)

DiabetesPedigreeFunction: Diabetes pedigree function

Age: Age (years)

Outcome: Class variable (0 or 1)

Diabetes-Prediction directory tree

├─ app.py
├─ demo.gif
├─ downloads
│  └─ prediction.csv
├─ LICENSE
├─ models
│  ├─ model.py
│  ├─ my_model.pkl
│  ├─ predict.py
│  └─ transformer.pkl
├─ procfile
├─ README.md
├─ requirements.txt
├─ src
│  └─ diabetes.csv
├─ static
│  └─ css
│     ├─ grid.css
│     ├─ images
│     │  └─ dia.jpeg
│     └─ style.css
├─ templates
│  └─ index.html
└─ uploads
   └─ test.csv

app.py : Front and back end portion of the web application

downloads : conatains predcited csv file(based on uploaded file)

models : contains model for prediction

requirements.txt : required library

src : conatins raw data file

static : contains static file (css, img) for UI

templates : contains templates for UI

uploads : uploded csv file will store here after that it will used for prediction(added test file for sample)

Installation

  • Clone this repository and unzip it.

  • create new env with python 3 and activate it .

  • Install the required packages using pip install -r requirements.txt

  • Execute the command: python app.py

  • Open http://127.0.0.1:5000/ in your browser.

Technologies Used

License

License: MIT

About

This project aims to predict the type 2 diabetes, based on the dataset. It uses machine learning model,which is trained to predict the diabetes mellitus before it hits.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published