This project uses machine learning to predict whether or not a patient has heart disease based on their medical information. We use three different models (Decision Tree, Random Forest, and Logistic Regression) and compare their performance.
- Python 3.x
- scikit-learn
- pandas
- matplotlib
- numpy
- Clone or download the repository.
- Run the script with the command: python main.py
The script will train the models on the dataset, evaluate their performance, and display a bar plot comparing the performance of the models.
The dataset used in this project is the Heart Disease dataset from the UCI Machine Learning Repository. It consists of medical information of patients such as age, sex, cholesterol levels, blood pressure, etc., and a target variable indicating whether or not they have heart disease (0 for no heart disease, 1 for heart disease).
I used three different models:
Decision Tree Random Forest Logistic Regression Each model is trained on the dataset and evaluated using five different metrics: accuracy, precision, recall, F1-score, and ROC AUC score.
The script outputs the performance of each model in terms of the five metrics and displays a bar plot comparing the performance of the models.