Skip to content

princeboateng577/Heart_Attack_Prediction_Using_Machine_Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heart Attack Prediction Project

Project by

-Sandra -Prince -Carles -Ricardo

Overview

This project focuses on analyzing and predicting heart attack risks using machine learning techniques. The dataset is preprocessed to clean and prepare the data before applying predictive models.

Slides

https://docs.google.com/presentation/d/13aHPF2eJQazkJRJQuv7yul5ia5v35nhanASGUbA7uM8/edit#slide=id.g33a945bd0e5_0_265

Dataset

The dataset used in this project contains various medical and demographic attributes related to heart health. It includes features such as:

  • Blood pressure (systolic and diastolic)
  • Age
  • Cholesterol levels
  • Heart rate
  • Other relevant medical factors

Data Preprocessing

Several preprocessing steps were performed to clean and prepare the dataset:

  • Checking for missing values and handling them appropriately
  • Standardizing column names for consistency
  • Splitting the blood pressure column into systolic and diastolic pressures
  • Dropping unnecessary columns such as patient_id, continent, and hemisphere
  • Converting categorical variables and normalizing numerical features

Exploratory Data Analysis (EDA)

EDA was performed using libraries such as Pandas, Matplotlib, and Seaborn to:

  • Visualize the distribution of key medical attributes
  • Identify correlations between different features
  • Examine the relationship between heart attack risk and key medical indicators

Machine Learning Model

A Decision Tree Classifier was used to predict heart attack risk based on the preprocessed dataset. The model was trained using:

  • Feature engineering to optimize input variables
  • Model evaluation metrics to assess performance
  • Decision tree visualization to understand important contributing factors

Results

The project provides insights into key factors influencing heart attack risks and demonstrates the effectiveness of machine learning models in medical diagnosis. The results can be used to improve early detection and preventive measures.

Requirements

To run this project, ensure you have pyproject.toml configured with all necessary dependencies. Install them using:

pip install -e .

Usage

  1. Load the dataset.
  2. Run the preprocessing steps.
  3. Perform EDA to understand the data.
  4. Train and evaluate the decision tree model.
  5. Visualize important features contributing to heart attack risks.

Conclusion

This project highlights the importance of data-driven approaches in medical predictions. Further improvements can be made by exploring other machine learning models and fine-tuning hyperparameters for better accuracy.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •