Giter Site home page Giter Site logo

pradnya1208 / heart-disease-classification-using-ml Goto Github PK

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

This project aims to classify /predict the occurrence of Heart disease using Machine learning models.

Jupyter Notebook 100.00%
heart-disease-classification classification-algorithm heart-disease-analysis exploratory-data-analysis knn-classification random-forest

heart-disease-classification-using-ml's Introduction

github linkedin tableau twitter

Heart Disease Classification using Machine Learning

Overview:

WHO announced that cardiovascular diseases is the top one killer over the world. There are seventeen million people died from it every year, especially heart disease. Prevention is better than cure. If we can evaluate the risk of every patient who probably has heart disease, that is, not only patients but also everyone can do something earlier to keep illness away.

Dataset:

Heart Disease UCI

Dataset attributes:

There are thirteen features and one target as below:

  • age: The person's age in years

  • sex: The person's sex (1 = male, 0 = female)

  • cp: The chest pain experienced (Value 1: typical angina, Value 2: atypical angina, Value 3: non-anginal pain, Value 4: asymptomatic)

  • trestbps: The person's resting blood pressure (mm Hg on admission to the hospital)

  • chol: The person's cholesterol measurement in mg/dl

  • fbs: The person's fasting blood sugar (> 120 mg/dl, 1 = true; 0 = false)

  • restecg: Resting electrocardiographic measurement (0 = normal, 1 = having ST-T wave abnormality, 2 = showing probable or definite left ventricular hypertrophy by Estes' criteria)

  • thalach: The person's maximum heart rate achieved

  • exang: Exercise induced angina (1 = yes; 0 = no)

  • oldpeak: ST depression induced by exercise relative to rest

  • slope: the slope of the peak exercise ST segment (Value 1: upsloping, Value 2: flat, Value 3: downsloping)

  • ca: The number of major vessels (0-3)

  • thal: A blood disorder called thalassemia (3 = normal; 6 = fixed defect; 7 = reversable defect)

  • target: Heart disease (0 = no, 1 = yes)

Implementation:

Libraries: NumPy pandas matplotlib sklearn seaborn

Data Exploration:

Heart disease frequency w.r.t. Age:

Heart disease frequency w.r.t. Slope:

Heart disease frequency w.r.t. FBS:

Heart disease frequency w.r.t. Chest pain type:


Model training, Evaluations, and Predictions:


Our models work fine but best of them are KNN and Random Forest with 88.52% of accuracy. Let's look their confusion matrixes.

Confusion matrices:

Learnings:

Feature endineering Feature Scaling Classification Models Model Evaluation

Feedback

If you have any feedback, please reach out at [email protected]

๐Ÿš€ About Me

Hi, I'm Pradnya! ๐Ÿ‘‹

I am an AI Enthusiast and Data science & ML practitioner

github linkedin tableau twitter

heart-disease-classification-using-ml's People

Contributors

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