I have used Machine Learning approach for classifying whether a person is suffering from heart disease or not.
Here, “1” is the number of people suffering from heart disease and “0” is the number of people who are not suffering from heart disease. Hence the number of people suffering from heart disease is “165” and the number of people not suffering from heart disease is “138”.
Clearly, from this, we can assume that this is a classification problem with target variables having values “0” and “1”.
Here, by this count plot, we can see that number of females is less as compared to the number of males.
From the above barplot, we can easily see that the proportion of females suffering from heart disease is more than that of males.
Here type “0” is for typical anginal, type “1” is for atypical anginal, type “3” is for non-anginal, and type “4” is for asymptotic. Here, by this count plot, we can see that most of the patients have typical anginal chest pain whereas very few patients suffer from an asymptotic type of chest pain.
From the above barplot, we can easily see that people having typical anginal pain are much less likely to have heart problems as compared to the rest of the three.
Here we see people having fbs >120mg/dl i.e. “0” is very high as compared to people who are having fbs<120 mg/dl.
From the above barplot, we can clearly see that fbs does not have much effect on heart problem.
Here we can clearly see people having type “0” and type “1” is almost the same whereas people having type “2” is extremely low as compared to type “0” and type “1”.
From the above barplot, we can easily see that people having type “2” are much less likely to have heart problems as compared to type “0” and type “1”.
Here we can clearly see people having type “0” is more than type “1”.
From the above barplot, we can easily see that people having type “1” are much less likely to have heart problems as compared to type “0”.
Here we can clearly see people having slope “1” and slope “2” is much more than slope “0”.
From the above barplot, we can easily see that people having slope “2” have much more heart problems as compared to slope “0” and slope “1”.
From the above countplot we can see that people having ca=0 are extremely high in number as compared to the rest of the ca’s.
Here we see that people having ca=4 have a very high number of heart problems. As compared to the rest of the people.
From the above count plot, we can see that people having thal as type “2” is very as compared to the rest of the group.
From the above barplot, we can clearly see that type “0” has a high chance of having a heart problem.
From the above plot , we can clearly see the following things:-
-
cp (Chest Pain) : People with cp equl to 1, 2, 3 are more likely to have heart disease than people with cp equal to 0.
-
restecg (resting electrocardiographic results): People with value 1 (signals non-normal heart beat, can range from mild symptoms to severe problems) are more likely to have heart disease.
-
exang (exercise induced angina) : People with value 0 (No ==> exercice induced angina) have heart disease more than people with value 1 (Yes ==> exercice induced angina)
-
slope (the slope of the peak exercise ST segment) : People with slope value equal to 2 (Downslopins: signs of unhealthy heart) are more likely to have heart disease than people with slope value equal to 0 (Upsloping: better heart rate with excercise) or 1 (Flatsloping: minimal change (typical healthy heart)).
-
ca (number of major vessels (0-3) colored by flourosopy) : the more blood movement the better so people with ca equal to 0 are more likely to have heart disease.
-
thal (thalium stress result) : People with thal value equal to 2 (fixed defect: used to be defect but ok now) are more likely to have heart disease.
From the above plot , we can clearly see the following thing:-
-
trestbps : resting blood pressure (in mm Hg on admission to the hospital) anything above 130-140 is typically cause for concern
-
chol (serum cholestoral in mg/dl) : above 200 is cause for concern.
-
thalach (maximum heart rate achieved) : People how acheived a maximum more than 140 are more likely to have heart disease.
-
oldpeak ST depression induced by exercise relative to rest looks at stress of heart during excercise unhealthy heart will stress more.
The above is a scatter plot between Age and Max Heart Rate for Heart Disease.