Giter Club home page Giter Club logo

coronary-heart-disease-prediction's Introduction

Coronary Heart Disease Prediction

This is the Jupyter Notebook and the Dataset for the mentioned Classification Predictive Modeling

About the dataset:

The "Framingham" dataset is publically available on the Kaggle website, and it is from an ongoing cardiovascular study on residents of the town of Framingham, Massachusetts. The classification goal is to predict whether the patient has 10-year risk of future coronary heart disease (CHD).The dataset provides the patients’ information. It includes over 4,240 records and 15 attributes.

Objective: To build a classification model that predicts Ten Year Coronary Heart Disease in a subject.

I have performed the following steps:

  1. Read the file and displayed its columns.
  2. Handled missing values, Outliers and Duplicate Data.
  3. Calculated basic statistics of the data (count, mean, std, etc), did exploratory analysis and described my observations.
  4. Resampled the imbalanced dataset by oversampling the positive cases.
  5. Selected columns that will probably be important to predict heart disease.
  6. Created training and testing sets (using 60% of the data for the training and reminder for testing) and scaled the data using MinMaxScaler.
  7. Built 5 different machine learning models to predict TenYearCHD:
    • Logistic Regression - 67.56% Accuracy
    • kNN Classification - 89.98% Accuracy
    • Random Forest Classification - 90.39% Accuracy
    • Decision Tree Classification - 86.66% Accuracy
    • Gradient Boosting Classification - 71.46% Accuracy
  8. Hyperparameter tuned the RandomForestClassification - 95.77% and GradientBoostingClassification - 95.21%.
  9. Evaluated each model (f1 score, Accuracy, Precision ,Recall and Confusion Matrix) and plotted a graph for the false positive rate and true positive rate for each model.
  10. Ensembled the four best models using Stacking technique to further increase the accuracy of the model and achieved an accuracy score of 96.17%
  11. Concluded that Ensembling all the four most important models, with Random Forest Classification leading the way, has resulted in a very high accuracy score.

coronary-heart-disease-prediction's People

Contributors

indrapaul824 avatar

Stargazers

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