## 3 Materials and Methods
### XAI Techniques  
After applying various ML models for prediction, XAI techniques like LIME and SHAP were employed to improve the interpretability of the top-performing ANN model. LIME was used to produce local explanations for specific predictions by constructing simple, interpretable surrogate models that approximate the behavior of complex classifiers in a local neighborhood of individual data points. This enabled the critical features that influenced the predictions of the model for a particular patient, i.e., cholesterol levels, blood pressure, and age, to be identified. Healthcare professionals gained insight into why individual predictions were made, thus enhancing trust and transparency through the use of LIME. Global feature importance and dependency analysis between features were analyzed using SHAP. Feature interactions and nonlinear relationships were discovered using the SHAP dependency plots and provided deeper insights into the model's decision-making process. For both classes, SHAP summary plots were generated to illustrate overall feature importance, while force and waterfall plots explained individual predictions by showing each feature's contribution. Moreover, to gain insight into subgroup-specific trends, SHAP value analysis was carried out for both classes.  
\begin{table}
\begin{tabular}{l c} \hline \hline
**Model** & **Parameter Tuning** \\ \hline AdaBoost & n\_estimators = 30, learning rate = 1, algorithm = SAMME.R, base estimator = decisionclassifier \\ \hline Bagging & Base estimator = decisionclassifier, n\_estimators = 100, bootstrap = true \\ \hline RF & n\_estimators = 100, max\_depth = 16, bootstrap = true, min\_samples\_leaf = 0.1, min\_samples\_split = 2, \\  & min\_leaf\_nodes = 10 \\ \hline KNN & n\_neighbors = 10, weights = “uniform”, algorithm = “auto”, leaf\_size = 30 \\ \hline LR & Stopping criteria-1 \(\times\) 10\({}^{-9}\), bias = true, maximum iteration for convergence = 100 \\ \hline NB & Prior = default, smoothing = 1 \(\times\) 10\({}^{-9}\), class count = 2 \\ \hline SVM & Regularization = 1, kernel = rbf, kernel coefficient = gamma \\ \hline Vote & Voting = “hard”, estimators = logistic regression, decision tree, \\ \hline ANN & AF = “relu” for input layers, AF = “sigmoid” for output layer, dropout = “0.1”, batch size = “10”, \\  & num\_hidden\_layers = “1”, loss = “binary\_cross-entropy”, optimizer = “Adam”, epoch = “150” \\ \hline \hline \end{tabular}
\end{table}
Table 2: Hyperparameters tuned for all models using grid search.  
Figure 2: Proposed ANN model architecture.  
This study combined LIME and SHAP to obtain an overall and interpretable analysis of ML classifiers' behavior. These techniques uncovered essential information on the key contributors to heart attack risk, like cholesterol, systolic blood pressure, and lifestyle habits, to help healthcare professionals with actionable information for diagnosis and treatment. In addition to improving the reliability and accuracy of the heart attack prediction system, XAI methods enabled increased trust and confidence in the predictions of the models, fulfilling the pressing need for transparency in healthcare AI applications.