Giter Club home page Giter Club logo

stroke_prediction's Introduction

Stroke Prediction Using Machine Learning Approaches

Check out the code

I. Introduction

Stroke is the fifth cause of death in the United States, according to the Heart Disease and Stroke Statistics 2020 report. Those who suffer from stroke, if luckily survived, may also suffer from expensive medical bills and even disability. Foreseeing the underlying risk factors of stroke is highly valuable to stroke screening and prevention. In this project, the National Health and Nutrition Examination Survey (NHANES) data from the National Center for Health Statistics (NCHS) is used to develop machine learning models. The NHANES dataset holds an abundance of variables, ranging from demographics, medical history, physical examinations, biochemistry to dietary and lifestyle questionnaires. XGBoost (eXtreme Gradient Boosting) Classifier is used for feature selection since the model tolerates missing values and performs well with high-dimensional data.

II. Data Loading and Cleaning

  1. Exclude rows will null value or NA for the target variable "MCQ160F" (โ€œHas a doctor or other health professional ever told you that you had a stroke?โ€).
  2. Exclude columns with over 50% missing data.
  3. Missing data inputation with strategy='most_frequent'.

III. Feature Selection

  1. Train/Test split
  2. Train/predict with XGBoost before data preprocessing, result showed false high accuracy where recall for the minority class is very low.
  3. Oversampling with imblearn.SMOTE (Synthetic Minority Oversampling TEchnique).
  4. Using XGBoost for feature selection after oversampling.

Class imbalance


image

24 top features selected


image
image

Feature correlation


image

IV. Model Training

  1. Train/Test split
  2. Data normalization with sklearn.preprocessing.NormalScaler
  3. Logistic Regressio, Random Forest, Adaptive Boosting, Gradient Boosting, SVM, XGBoost model training and prediction.

V. Model Comparison

Accuracy score comparison.
image

VI. Future Work

  1. Model optimization/hyperparameter tuning
  2. Ensemble
  3. ROC/AUC comparison

References

  1. NHANES Datasets from 2013-2014:
    https://www.kaggle.com/cdc/national-health-and-nutrition-examination-survey
  2. A data-driven approach to predicting diabetes and cardiovascular disease with machine learning:
    https://pubmed.ncbi.nlm.nih.gov/31694707/
  3. Codebook:
    https://wwwn.cdc.gov/nchs/nhanes/Search/DataPage.aspx?Component=Demographics&CycleBeginYear=2013

stroke_prediction's People

Contributors

lcchennn avatar

Watchers

 avatar

Forkers

zhaoliang0302

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.