Coder Social home page Coder Social logo

xavierfactor / diabetes-predictive-analytics Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.72 MB

(Python) ML models that predict diabetic status

Jupyter Notebook 100.00%
average-precision f1-score gridsearchcv hyperparameter-tuning ml pipeline predictive-analytics python roc-auc-curve sklearn

diabetes-predictive-analytics's Introduction

Python project that utilize ML models to predict diabetic status of some 250,000 survey volunteers. Data has binary target and 21 numerical features and was imbalanced 86% vs 14% dataset in favor of the negative target class.

Data Source: https://www.kaggle.com/datasets/alexteboul/diabetes-health-indicators-dataset?resource=download

Methodology: Stratified train test split was performed with 20% of the data reserved for the test and the remaining 80% utilized for model selection. GridSearchCV was performed with 5 fold cross validation to determine the optimal hyperparameters. Evaluation was performed using ROC-AUC as the primary performance metric, while additional scores were taken for average precision, f1-score and recall. Threshold shifting was performed after to find the optimal secondary metrics such as for recall.

Discussion: Collectively, the models produced ROC-AUC above 0.8 for each model. F1 Score, the harmonic mean between recall and precision, was less impressive as no model was able to break 0.5. This result is unsurprising as diabetes is a highly complex condition with myriads of clinical interactions and nuances. Being able to score above 50% in one of the metrics of recall and precision is fairly good. In a similar case using BRFSS data from 2014, Zidian Xie et al. (Xie, 2019 - https://www.cdc.gov/pcd/issues/2019/19_0109.htm) built models that had sensitivities of around 50%-51% so our models performed very favorably.

Conclusion: The ML models predicted at a high level the diabetes status of individuals using a dataset with 250,000 subjects and only 21 features. These models all had ROC-AUC scores of above 0.8 and reported secondary metrics using threshold shifting to obtain optimal scores for F1 Score, Recall and Precision that compared favorably with literature results.

diabetes-predictive-analytics's People

Contributors

xavierfactor 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.