Skip to content

Commit 9865e25

Browse files
Merge pull request #201 from SaloniThete/main
Heart Failure Prediction
2 parents 527328b + 1ed9c74 commit 9865e25

File tree

10 files changed

+6925
-0
lines changed

10 files changed

+6925
-0
lines changed

Machine Learning/Heart Failure Prediction/Heart_Failure_Prediction.ipynb

Lines changed: 5912 additions & 0 deletions
Large diffs are not rendered by default.
30.1 KB
Loading
30.3 KB
Loading
27.4 KB
Loading
29.5 KB
Loading
29.2 KB
Loading
29.3 KB
Loading
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Heart Failure Prediction
2+
3+
# Introduction
4+
Heart disease is one of the most significant
5+
problem that is arising in the world today.
6+
Cardiovascular disease prediction is a critical
7+
challenge in the area of clinical data analysis.
8+
9+
Cardiovascular diseases (CVDs) are the number 1 cause of death globally, taking an estimated 17.9 million lives each year, which accounts for 31% of all deaths worldwide. Four out of 5CVD deaths are due to heart attacks and strokes, and one-third of these deaths occur prematurely in people under 70 years of age. Heart failure is a common event caused by CVDs and this dataset contains 11 features that can be used to predict a possible heart disease.
10+
11+
People with cardiovascular disease or who are at high cardiovascular risk (due to the presence of one or more risk factors such as hypertension, diabetes, hyperlipidaemia or already established disease) need early detection and management wherein a machine learning model can be of great help.
12+
13+
The prediction model is proposed with
14+
combinations of different features and several
15+
classification techniques.
16+
17+
# Attribute Information
18+
1. Age: age of the patient [years]
19+
2. Sex: sex of the patient [M: Male, F: Female]
20+
3. ChestPainType: chest pain type
21+
4. RestingBP: resting blood pressure [mm Hg]
22+
5. Cholesterol: serum cholesterol [mm/dl]
23+
6. FastingBS: fasting blood sugar
24+
7. RestingECG: resting electrocardiogram results
25+
8. MaxHR: maximum heart rate achieved
26+
9. ExerciseAngina: exercise-induced angina [Y: Yes, N: No]
27+
10. Oldpeak: oldpeak = ST
28+
11. ST_Slope: the slope of the peak exercise ST segment
29+
12. HeartDisease: output class [1: heart disease, 0: Normal]
30+
31+
# Workflow
32+
1. Importing Required Libraries
33+
2. Load the Dataset
34+
3. EDA(Exploratory Data Analysis
35+
4. Data Cleaning and preprocessing
36+
5. Data Visualization
37+
6. Training the model
38+
7. Predict the accuracies of all 6 classifiers
39+
8. Comparing performance of the models
40+
41+
# Data Visualization
42+
ROC Curves of models.
43+
1. Random Forest Classifier<br>
44+
![](Image/Random%20Forest%20Classifier.png)<br>
45+
2. K Nearest Neighbour<br>
46+
![](Image/KNN.png)<br>
47+
3. Decision Tree Classifier<br>
48+
![](Image/Decision%20Tree%20Classifier.png)<br>
49+
4. Gradient Boosting Classifier<br>
50+
![](Image/Gradient%20Boosting.png)<br>
51+
5. .Logistic Regression<br>
52+
![](Image/Logistic%20Regression.png)<br>
53+
6. SVM(Support Vector Machine)<br>
54+
![](Image/SVM.png)<br>
55+
56+
# Advantages of Heart Failure Prediction
57+
1. Increased accuracy for effective heart
58+
disease diagnosis.
59+
2. Handles roughest(enormous) amount of
60+
data using random forest algorithm and
61+
feature selection.
62+
3. Reduce the time complexity of doctors.
63+
4. Cost effective for patients.
64+
65+
# Disadvantages of Heart Failure Prediction
66+
* Prediction of cardiovascular disease
67+
results is not that accurate.
68+
69+
# Accuracies gained by the models
70+
1. RandomForest 88.260870
71+
2. KNeighbors 73.913043
72+
3. DecisionTree 79.130435
73+
4. GradientBoosting 87.826087
74+
5. Logistic Regression 0.847826
75+
6. Support vector machine 0.726087
76+
77+
# Conclusion
78+
we proposed a method for heart
79+
disease prediction using machine learning
80+
techniques, these results showed a great
81+
accuracy standard for producing a better
82+
estimation result. By introducing new proposed
83+
Random forest classification, we find the
84+
problem of prediction rate without equipment
85+
and propose an approach to estimate the heart
86+
rate and condition. Sample results of heartrate
87+
are to be taken at different stages of the same
88+
subjects, we find the information from the above
89+
input via ML Techniques.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Libraries imported in the Heart Failure Prediction:
2+
1.pandas
3+
2.matplotlib
4+
3.seaborn
5+
4.plotly

0 commit comments

Comments
 (0)