Coder Social home page Coder Social logo

diabetes-prediction's Introduction

The task has been accomplished by using Neural Networks, and uses the idea of Entity Embeddings, Here is the research paper Entity Embeddings arxiv, and this project implents that idea

Feature Engineering is not useful for Neural Networks as they are able to do that part by themself, and the missing value imputation was done to apply idea of Entity Embeddings on the categorical features

Diabetes Prediction

Table of Content

Overview

This is a simple classification project which uses Xgboost (Not uploaded here) and Deep Neural Network models trained on the top of keras API. The trained model that takes patients vitals and information as input and predict wether the patient has Diabetes-mellitus or not.

Motivation

Getting a rapid understanding of the context of a patient’s overall health has been particularly important during the COVID-19 pandemic as healthcare workers around the world struggle with hospitals overloaded by patients in critical condition. Intensive Care Units (ICUs) often lack verified medical histories for incoming patients. A patient in distress or a patient who is brought in confused or unresponsive may not be able to provide information about chronic conditions such as heart disease, injuries, or diabetes. Medical records may take days to transfer, especially for a patient from another medical provider or system.

Knowledge about chronic conditions such as diabetes can inform clinical decisions about patient care and ultimately improve patient outcomes.

Data

To download the data you can go to the following link or use the kaggle api by typing the following command in the terminal kaggle competitions download -c widsdatathon2021 The data is from MIT’s GOSSIS (Global Open Source Severity of Illness Score) initiative, it can be found in (../inputs/wids2021/)

  • TrainingWiDS2021.csv is the training file

Frameworks-used

  1. pandas
  2. scikit-learn
  3. keras
  4. tensorflow


Labels

{0 : patient not diagnosed with Diabetes Mellitus, 1: patient diagbosed with Diabetes Mellitus}

Evaluation Metric

The Data distribution is very skewed: label 0: 28,151 label 1: 102,006

The Data has class imbalance, around 20% of people have diabetes and the rest 80% don't have diabetes, also in general, in the world only 8% people have diabetes

So Accuracy was not a good evaluation metric here (as if we predict the most frequent class, we will still get 80% accuracy), So instead of that we will use AUC ROC curves to validate our model.

EDA-Insights

  • There are alot of missing values
  • For each patient, vitals are stored at the first hour and after a day
  • Around 33% of the data is missing, and many hourly data columns have more than 80% of the data missing in most cases
  • Glucose level variable has high correlation to the target variable('diabetes_mellitus') of 0.401, as expected

Cross-Validation

We are going to use Stratified K Fold cross-validation method, because there is high class imbalance in the dataset. We are using 5 folds.

Model

We are using Neural Network, which takes numerical features, and categorical features embedding (Entity Embeddings) and 2 Xgboost Models

Result

We get an AUC ROC score of 0.855307

diabetes-prediction's People

Contributors

aditya-jha2002 avatar ima-helikoptaaa avatar

Stargazers

 avatar

Watchers

James Cloos 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.