Heart Disease Prediction Project

Heart Disease Prediction using Random Forest

Problem:

World Health Organization (WHO) has estimated 12 million deaths occur worldwide, every year due to Heart diseases. Half the deaths in the United States and other developed countries are due to cardio vascular diseases. The early prognosis of cardiovascular diseases can aid in making decisions on lifestyle changes in high risk patients and in turn reduce the complications. This research intends to pinpoint the most relevant/risk factors of heart disease as well as predict the overall risk using logistic regression.

Solution:

The classification goal is to predict whether the patient has 10-year risk of future coronary heart disease (CHD).


Data info:

The dataset is available on the Kaggle website, and it is from an ongoing cardiovascular study on residents of the town of Framingham, Massachusetts. The dataset provides the patients’ information. It includes over 4,000 records and 15 attributes.

Framingham Heart study dataset includes several demographic risk factors:-

  1. sex: male or female
  2. age: age of the patient
  3. education: levels coded 1 for some high school, 2 for a high school diploma or GED, 3 for some college or vocational school, and 4 for a college degree.

The data set also includes behavioral risk factors associated with smoking

  1. currentSmoker: whether or not the patient is a current smoker
  2. cigsPerDay: the number of cigarettes that the person smoked on average in one day.

Medical history risk factors

  1. BPMeds: whether or not the patient was on blood pressure medication
  2. prevalentStroke: whether or not the patient had previously had a stroke
  3. prevalentHyp: whether or not the patient was hypertensive
  4. diabetes: whether or not the patient had diabetes

Risk factors from the first physical examination of the patient.

  1. totChol: total cholesterol level
  2. sysBP: systolic blood pressure
  3. diaBP: diastolic blood pressure
  4. BMI: Body Mass Index
  5. heartRate: heart rate
  6. glucose: glucose level
  7. TenYearCHD: 10 year risk of coronary heart disease CHD (TARGET VARIABLE)

Libraries Used -

  1. Pandas (for data manipulation)
  2. Matplotlib (for data visualization)
  3. Seaborn (for data visualization)
  4. Scikit-Learn (for data modeling)
  5. Warnings (for hiding warnings)
  6. Imblearn (for data oversampling)

Credits: https://github.com/Ravjot03/Heart-Disease-Prediction