Heart Failure Prediction using Supervised ML Approach
View Notebook: Heart_Failure.ipynb
Heart failure is a critical medical condition that affects a significant number of people worldwide. Predicting heart failure in patients can help medical professionals take proactive measures to prevent adverse outcomes and provide timely interventions. In this project, we aim to build a machine learning model to predict heart failure in patients using a supervised ML approach.
The dataset used in this project contains the medical records of 299 patients who experienced heart failure during their follow-up period. Each patient profile consists of 13 clinical features, including age, presence of anemia, high blood pressure, creatinine phosphokinase (CPK) levels, diabetes status, ejection fraction, platelet count, gender, serum creatinine levels, serum sodium levels, smoking habit, follow-up period, and death event.
The dataset can be accessed from the following source: Heart Failure Clinical Records
The main objective of this project is to develop a machine learning model that can accurately predict heart failure in patients. To achieve this, we follow a supervised ML approach, where we train the model using the available dataset with labeled heart failure cases. Once trained, the model can then be used to make predictions on new, unseen data.
We employ various ML algorithms and techniques to build and evaluate the model's performance. Evaluation metrics such as recall and F-score are used to assess the model's accuracy in predicting heart failure cases. The model that exhibits the best performance is selected as the final prediction model.
The project directory is structured as follows:
├── HeartFailure_Report.pdf
└── Heart_Failure.ipynb
├── LICENSE
├── README.md
├── heart_failure_clinical_records_dataset.csv
HeartFailure_Report.pdf
is the report file containing procedures and results.Heart_Failure.ipynb
is the Jupyter Notebook file containing the code and analysis for the Heart Failure Prediction project.LICENSE
is the file specifying the project's license information.README.md
is the README file providing an overview and instructions for the project.heart_failure_clinical_records_dataset.csv
is the dataset file containing the heart failure clinical records.
These files collectively form the structure of the Heart Failure Prediction project repository.
To run the project notebook locally, please follow these steps:
- Clone this repository to your local machine or download the notebook file
Heart_Failure.ipynb
directly. - Ensure that you have the necessary dependencies installed. You can refer to the
requirements.txt
file for the required libraries and their versions. - Open the notebook using Jupyter Notebook or any compatible environment.
- Execute the cells in the notebook sequentially to replicate the project's results and explore the code and analysis.
After evaluating various ML models on the heart failure prediction task, we found that the Voting Classifier exhibited the highest performance. The Voting Classifier combines the predictions of multiple individual classifiers to make the final prediction. It leverages the strengths of different algorithms, resulting in improved predictive accuracy for heart failure cases.
The evaluation metrics, including recall and F-score, indicate the model's effectiveness in identifying heart failure instances. By utilizing this model, medical professionals can make more informed decisions and provide timely interventions to improve patient outcomes.