Skip to content

A system that predicts the risk of heart diseases in patients using information such as chest pain, cholesterol, thalassemia, exercise-induced angina, ECG, etc.

License

Notifications You must be signed in to change notification settings

MaharshSuryawala/Heart-Disease-Risk-Prediction

Repository files navigation

Heart-Disease-Risk-Prediction

Contributors Stargazers Followers MIT License Open Source? Yes!

Table of Contents

About the Project

Heart

Photo by jesse orrico on Unsplash

Overview

  • It is a well-known fact that Heart Diseases are currently the leading cause of death across the world.

  • The development of a computational system that can predict the presence of heart diseases will significantly reduce the mortality rates & substantially reduce the costs of health care.

  • Such information predicted well in advance, can provide important insights to doctors.

  • For more information regarding this project. - Click here.

Built With

Dataset

Source: UCI Heart Disease Dataset

  • Each data-set from Cleveland, Hungary, Switzerland, and Long-Beach consisted of 76 attributes.
  • However, it is recommended to use only 14 for our analysis.
  • Moreover, later we will find out that only 6 attributes have a significant effect.
  • In this notebook, classifiers were built using one combined dataset and the performance evaluation is carried out using cross-validation techniques.
  • In addition to this, heart-disease prediction is carried out using logistic regression, random forest, neural-network, and decision tree.

Inferences derived from Exploratory Data Analysis.

Total number of observations of healthy people and people suffering from heart-diseases.

1

It can be observed that heart disease is uniformly spread out across age. In addition to that the median age for patients estimated was 56 with youngest and oldest being 29 and 77, respectively.

2

It can be observed from the plots that the median age of the people exhibiting heart diseases is less than the healthy ones. Moreover, it can be observed that the distribution of patients exhibiting heart diseases is slightly skewed. Hence, we can use age as a predictive feature.

3

It can be observed that there is no major difference between the distributions of Rest ECG of healthy people and the ones exhibiting heart diseases.

4

Moreover, it can be observed here that majority of the people exhibiting heart diseases have their serum cholesterol in the range of 200 - 300 mg/dl

5

People exhibiting heart diseases generally have higher maximum heart rates as compared to health people.

6

Majority of heart diseased patients have ST-Depression of 0.1

7

Most of the people who have 0-Major vessels are suffering from heart diseases

8

Heart diseases among females are higher as compared to males.

9

Majority of people suffering from heart-diseases have chest pain of type 1 or 2.

10

No major difference in fasting blood sugar.

11

People having Rest ECG-1 have a higher probability of suffering from heart diseases.

12

People with No exercise induced angina have a higher probability of getting heart diseases.

13

People with Peak Exercise slope 2 have a higher probability of exhibiting heart diseases.

14

People with fixed defect Thalassemia have a higher probability to suffer from heart diseases

15

It can be observed that only a few parameters such as Chest pain type, Gender, Exercise induced angina, Number of vessels, and ST depression have a significant effect. Hence, dropping other parameters

16

Results

  • Logistic Regression
    • Accuracy: 78.54%
    • Sensitivity: 84.77%
    • Specificity: 72%

17

  • Random Forest
    • Accuracy: 89.76%
    • Sensitivity: 85.59%
    • Specificity: 95.4%

18

  • Neural Network
    • Accuracy: 81.95%
    • Sensitivity: 76.98%
    • Specificity: 89.87%

19

  • Decision Tree
    • Accuracy: 86.65%
    • Sensitivity: 81.4%
    • Specificity: 87.56%

20

Contributing

Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/amazing-feature)
  3. Commit your Changes (git commit -m 'feat: some amazing feature')
  4. Push to the Branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Linkedin

Maharsh Suryawala - Portfolio

Project Link: https://github.com/MaharshSuryawala/Heart-Disease-Risk-Prediction

Acknowledgements

ForTheBadge built-with-love

About

A system that predicts the risk of heart diseases in patients using information such as chest pain, cholesterol, thalassemia, exercise-induced angina, ECG, etc.

Topics

Resources

License

Stars

Watchers

Forks

Languages