Heart disease prediction
This project focuses on predicting heart disease using machine learning algorithms. The dataset used in this project is from the UCI Machine Learning Repository.
The goal of this project is to build machine learning models that can predict whether a patient has heart disease based on various medical attributes. We explore different algorithms such as Logistic Regression, Decision Trees, and Support Vector Machine (SVM) to achieve this objective.
The dataset used in this project (heart.csv
) contains several medical attributes such as age, sex, cholesterol levels, etc., along with a target variable indicating the presence or absence of heart disease.
We perform exploratory data analysis to understand the distribution of variables and their relationships with the target variable. Visualizations such as bar plots, heatmap of correlations, and histograms are used to gain insights into the data.
-
Logistic Regression: We train a logistic regression model and evaluate its performance using metrics like accuracy, sensitivity, specificity, and precision.
-
Decision Trees: Decision tree classifier is employed to predict heart disease. We analyze its performance metrics on the test set.
-
Support Vector Machine (SVM): An SVM classifier with a linear kernel is trained and evaluated.
We test our best-performing model (Decision Tree) on sample input data to demonstrate its usage in making predictions for new patients.
To run the code:
- Make sure you have Python installed on your system.
- Install the required libraries by running
pip install -r requirements.txt
. - Run the Jupyter notebook or Python script provided in the repository.
- Saurav Kharat[alpharosto]