## 4 Results and Discussion
### XAI-Based Feature Importance Analysis
\"Maximum heart rate achieved\" (thalach \(>\) 0.72) and \"fasting blood sugar\" (fbs \(\leq-\)0.39) slightly support the \"Abnormal\" class, while \"cholesterol\" (chol \(\leq-\)0.68) and \"exercise-induced angina\" (exang \(\leq-\)0.67) mildly favor the \"Normal\" class. Features like \"resting ECG\" (restecg) and \"chest pain type\" (cp) have minimal impact on this prediction. The model's decision is primarily influenced by \"slope\", \"thal\", and \"age\", with \"age\" being the strongest abnormality indicator. However, opposing factors suggest the model leans toward predicting \"Normal\". This visualization clarifies feature contributions, enhancing trust in the model's healthcare applications. Figure 5: Global feature importance using LIME. Figure 8 shows the SHAP summary plot for Class 1 (Abnormal), which corresponds to the patients who had heart attacks. It emphasizes the most important features affecting  
Figure 6: LIME-based local explanation of the ANN. Figure 7: Feature weights-based local explanation using LIME. the models' predictions. The graph concludes that \"ca\", \"cp\", and \"thal\" features are the most important features in determining whether a patient has a heart attack or not. The high values of \"ca\" have a high contribution to heart attack predictions, i.e., the higher the number of affected vessels, the higher the risk. Likewise, \"cp\" and abnormal \"thal\" values are also strong pointers. On the contrary, small SHAP values for low \"oldpeak\" (ST depression) and \"thalach\" (maximum heart rate) correspond to low heart attack probability. In fact, the need for a holistic diagnostic approach is reinforced by the way complex interactions between features such as \"slope\", \"sex\", and \"age\" are captured by the model. The understanding of these feature contributions is clinically useful in helping healthcare professionals to prioritize key risk factors. Figure 9 shows the SHAP summary plot for Class 0 (normal or not heart attack) patients with key features explained. Variables that contribute to normal classification are \"cp\", \"ca\", and \"thal\", with comparatively low values within the graph. On the contrary, higher values of \"oldpeak\" and \"thalach\" tend to decrease the probability of being in a normal class, as these are indicative of heart problems. It shows how features like \"slope\" and \"thalach\" interact with each other to distinguish risk patients from normal patients. Clinically, \"ca\" and \"thal\" serve as strong indicators of normalcy, while \"oldpeak\" and \"thalach\" signal potential risks. Figure 10 shows the SHAP value analysis of Class 0 (normal) and Class 1 (heart attack). After analyzing the graph, key features that contribute to Class 0 are \"cp\", \"ca\", and \"thal\". In Class 1, oldpeak (ST depression) and slope (heart's stress response) have the highest influence, followed by cp and ca in the heart attack prediction. Sex and thalach (max heart rate) have moderate features, while fbs (fasting blood sugar) has minimal features. It can be observed for both classes that cp and ca are dominant predictors, but oldpeak and slope have a much higher influence in heart attack cases, further proving that they are clinically relevant. Figure 8: Feature summary plot for Class 1. Figure 11 illustrates the SHAP force plot, showing how individual features influence a specific heart attack (Class 1) prediction. Red arrows push the model toward higher risk, while blue arrows reduce it. Key risk factors include age (57), high resting blood pressure (150), and male sex, while protective factors like no major vessel narrowing (ca = 0), atypical angina (cp = 2), and high maximum heart rate (thalach = 174) lower the probability. The base value (0.5284) represents the model's expected output, with a final prediction of f(x) = 0.101, indicating a low heart attack likelihood. Overall, normality-driving features dominate, leading to a classification closer to normal (Class 0).