Heart Attack Prediction Using Machine Learning
Heart Attack Prediction Using Machine Learning
3 Cost-Effective Care
Preventing a heart attack through early detection reduces the need for expensive emergency treatments and long-term hospital stays.
Mission Objectives
The dataset includes 14 key health-related factors such as age, By studying these factors, we can find patterns related to heart
gender, chest pain type, blood pressure, cholesterol levels, blood attacks. For example, high cholesterol, high blood pressure, and
sugar, heart rate, and exercise-related changes. These factors help certain chest pain types are strongly linked to higher risk. These
provide a complete picture of a person’s heart health and are used patterns help our model make accurate predictions and identify
to predict the risk of a heart attack. people at risk early.
Algorithms Used: Random Forest, Decision Tree,
XGBClassifier
Random Forest Decision Tree XGBClassifier
• An ensemble method that • A simple tree-like structure that • A gradient boosting algorithm that
combines multiple decision trees to splits data into specific categories builds decision trees sequentially,
improve accuracy and reduce using a series of decision rules. with each tree correcting the errors
overfitting. • Easy to understand and interpret of the previous one.
• Works by averaging the predictions but prone to overfitting on complex • Known for its high performance
from individual trees to make datasets. and ability to handle complex
robust and reliable predictions. datasets efficiently.
Model Training and Evaluation Methodology
Data Collection 1
A comprehensive dataset containing 13 key clinical parameters was
assembled. These features are essential for predicting the likelihood of a
heart attack. 2 Data Preprocessing
The dataset was thoroughly cleaned by handling missing values, outliers,
and ensuring data consistency. Feature selection techniques were applied to
Model Training 3 identify the most relevant parameters for accurate prediction.
Three machine learning models were trained: Decision Tree, Random Forest,
and XGBClassifier. These models were trained using the preprocessed data
and evaluated for performance. 4 Model Evaluation
The models' performance was evaluated using metrics like AUC (Area Under
Curve) score and accuracy. Hyperparameters were fine-tuned to optimize the
Prediction and Outcome 5 models for better performance.
The best performing model was selected for real-time predictions. This
allows for early detection and intervention based on clinical parameters.
6 Results Interpretation
Insights from the models, such as feature importance and correlations,
helped in understanding key risk factors for heart attacks. This knowledge
guides preventive healthcare strategies.
Model Performance:
86.88% Accuracy
86.88%
Accuracy
The model correctly predicted heart attacks in 86.88% of cases.
Future Enhancements
The future work of this project will focus on developing a wearable device that
integrates sensors to collect real-time health data, such as heart rate, blood
pressure, and oxygen levels. This device will continuously monitor the user’s
vital signs and send the data to a machine learning model. The model will then
process this real-time information to predict the likelihood of a heart attack,
offering instant and accurate results.
Through this approach, users will have greater control over their heart health,
making informed decisions and receiving early warnings about potential heart
risks.
Benefits of Future Enhancement
Integrating real-time health data monitoring via a wearable device offers several key advantages: