Sale!

Heart Attack Risk Prediction using Machine Learning with Flask App Project

Original price was: ₹2,599.00.Current price is: ₹799.00.

The following contents are Downloadable immediately after the successful payment

  • Source Code

  • Flask App

  • Dataset

  • Trained Model

  • Project Report (Both PDF and Word files)

  • PowerPoint Presentation (PPT)

  • Instructions to install the necessary Software and Libraries

  • Step-by-step instructions to execute the project

Project Description

The fact that human life depends on the proper functioning of the heart is the driving force behind this research. The heart is a crucial part of our bodies, and heart disease has become the
leading cause of death globally. With the increase in the number of deaths among people due to heart disease, it becomes an issue to be addressed.

Heart attacks and cardiovascular diseases (CVDs) are indeed the leading cause of death globally, responsible for more fatalities each year than any other condition. According to the World Health Organization (WHO), cardiovascular diseases claim an estimated 17.9 million lives annually, accounting for nearly 32% of all global deaths. Every 40 seconds, a person dies of a heart attack in the United States of America.

This application takes age, BMI, Systolic Blood Pressure, Diastolic Blood Pressure, heart rate, and blood glucose levels as input to give the risk in percentage associated with having a heart attack in a patient in 10 years’ time.

Video Demonstration of Heart Attack Risk Prediction using Machine Learning with Flask App Project

Methodology

Data Collection

The dataset is taken from a town called Framingham in the city of Massachusetts, where cardiovascular research was being conducted. It is available to the public on the Kaggle website. The purpose of this project is to find out the risk associated with developing coronary heart disease(CHD) in the coming years. If the patient has a risk of developing coronary heart disease (CHD) in the coming 10 years. The data collection contains information about the patients. There are almost 4000 records and 15 qualities in all. Each characteristic has the possibility of becoming a risk factor. Risk factors include demographic, behavioral, and medical concerns.

Data Cleaning and Pre-Processing

We examined the dataset for missing and duplicate variables, as they might have a significant impact on the effectiveness of machine learning methods (many algorithms do not tolerate missing data). When we were going through the data pre-processing phase, we found that the dataset had no duplicate rows in the dataset.

Handling Imbalanced Data

Imbalanced data distribution is a phrase used frequently in Machine Learning and Data Science to describe when observations in one class are considerably higher or lower than observations in other classes. Machine Learning algorithms ignore class distribution since their goal is to improve accuracy by decreasing error.

Unbalanced Data Handling Techniques:

There are two main techniques for dealing with an unequal distribution of classes.

  1. SMOTE
  2. Near-Miss Algorithm

Feature Selection

The results of the correlation matrix indicate that we need to use feature selection. To do the feature selection, the Boruta feature selection technique, a wrapper method that is built above the random forest classification, was used. Its main aim is to capture all the important and interesting elements of the dataset related to the resultant variables.

Machine Learning Classifier

The following machine learning algorithms are used to train the model

  1. K-Nearest Neighbour
  2. Logistic Regression

Installation of required software and Libraries (One Time)

1. Install the Anaconda Python Package
2. Open Anaconda Prompt and move to the downloaded project directory (Heart Attack Risk Prediction) using the cd command
Example:
>> cd Path_of_Project_Directory
3. Create the virtual environment using the command below
>>conda create -n harp python==3.11.7
4. Activate the virtual environment using the command
>>conda activate harp
5. Now install the required Libraries using the below command
>>pip install -r requirements.txt

Steps to train the model after the Installation of the required software and Libraries

1. Open Anaconda Prompt and move to the downloaded project directory (Heart Attack Risk Prediction) using the cd command
Example:
>> cd Path_of_Project_Directory
2. Activate the virtual environment using the command
>>conda activate harp
Note: harp is the environment created at the time of installing the software and Libraries
3. Next, to train the model, open the Jupyter Notebook using the command below
>>jupyter notebook
4. Open the Heart-Attack-Risk-Prediction.ipynb and run all cells
5. Once the training is completed the trained model knn_model.pkl and logreg_model.pkl will be stored in the models directory

Steps to run the Flask App after training the modelĀ 

1. Open Anaconda Prompt and move to the downloaded project directory (Heart Attack Risk Prediction) using the cd command
Example:
>> cd Path_of_Project_Directory
2. Activate the virtual environment using the command
>>conda activate harp
Note: harp is the environment created at the time of installing the software and Libraries
3. Run the Flask App using the below command
>>python app.py

Tech Stack used to implement the project

Language: Python
Libraries: numpy, pandas, matplotlib, scikit-learn, boruta, imbalanced-learn

Happy Learning

Still need help to set up and execute the project

  • Setup and modification are paid services based on requirements.

Reviews

There are no reviews yet.

Be the first to review “Heart Attack Risk Prediction using Machine Learning with Flask App Project”

Your email address will not be published. Required fields are marked *

Welcome to VTUPulse.com


Computer Graphics and Image Processing Mini Projects -> Click Here

Download Final Year Project -> Click Here

This will close in 12 seconds