Heart_Failure_Prediction

Heart Failure Prediction Using Machine Learning

Cardiovascular diseases (CVDs) are the number 1 cause of death globally, taking an estimated 17.9 million lives each year, which accounts for 31% of all deaths worlwide. Heart failure is a common event caused by CVDs and this dataset contains 12 features that can be used to predict mortality by heart failure.

Most cardiovascular diseases can be prevented by addressing behavioural risk factors such as tobacco use, unhealthy diet and obesity, physical inactivity and harmful use of alcohol using population-wide strategies.

People with cardiovascular disease or who are at high cardiovascular risk (due to the presence of one or more risk factors such as hypertension, diabetes, hyperlipidaemia or already established disease) need early detection and management wherein a machine learning model can be of great help.

Short Introduction

About 400,000 adults die of heart failure (HF) in the United States every year. HF occurs when the heart cannot pump enough blood to support the organs in the body [CDC]. Cardiovascular research studies have identified correlations between creatine levels, ejection fraction rates, and HF. Using machine learning classifiers, a patient’s survival can be predicted based on important clinical features.

Python Script

I. Exploratory data analysis

Correlation analysis

K-Means clustering

Principle component analysis

II. Heart failure prediction

Splitting dataset into the test set and the training set

Model evaluation

Accuracy score, precision score, recall score, and f1 score for all the machine learning models

Random forest and decision tree predictions

Machine learning classifiers used:

Random Forest Classifier

Logistic Regression

K-Nearest Neighbors

Support Vector Classification (linear)

Support Vector Classification (radial basis function)

Gaussian Naive Bayes

Decision Tree

XGBoost

ANN Claasifier

Prediction Form

Screenshot (441)

This shows how the heart failure is predicted.