Heart Disease Prediction Using Machine Learning
From the given clinical parameters about a patient, prediction models like Logistic Regression, K-Nearest Neighbours Classifier, Support Vector Machine, Decision Tree Classifier and Random Forest Classifier to predict whether or not the patient has heart disease.
Methodology
High accuracy prediction be done by following the steps below:
- Importing the required modules
- Importing the dataset
- Performing Exploratory Data Analysis on the dataset
- Plotting the graphs to compare with the results
- Processing the data
- Analysing the accuracy score by determing the confusion matrix and classifying the reports
- Splitting data into test and train
- Building the logistic regression model and predicting heart disease and finalising the accuracy score
- Building the K-Nearest Neighbours classification model and predicting heart disease and finalising the accuracy score
- Building the support vector machine model and predicting heart disease and finalising the accuracy score
- Building the decision tress classifier model and predicting heart disease and finalising the accuracy score
- Building the random forest model and predicting heart disease and finalising the accuracy score
- Comparing the accuracy of each model and declaring which model predicts the heart disease in a patient with higher accuracy
Result:
By performing the above steps, we can see that K-Nearest Neighbour Algorithm predicts data with higher accuracy.