## 3 Materials and Methods
### Proposed ANN Model  
The proposed ANN model consists of three layers: an input layer with 12 neurons using the ReLU activation function (AF), a hidden layer with 8 neurons also using ReLU, and an output layer with a sigmoid AF for binary classification (1 for yes, 0 for no). ReLU ensures that negative values are converted to zero, while sigmoid differentiates outputs into two classes. The architecture is designed to prevent overfitting, with hyperparameters optimized to a batch size of 10, 150 epochs, and a single hidden layer. The model minimizes the error between training and testing data by adjusting weights and biases during learning. Each neuron processes multiple inputs, applies weighted calculations with bias, and passes the result through an AF to generate an outcome, refining weights iteratively to improve accuracy.  
\[S=\boldsymbol{\alpha}_{1}x_{1}+\boldsymbol{\alpha}_{2}x_{2}+\ldots+\boldsymbol{ \alpha}_{m}\boldsymbol{x}_{m}+\boldsymbol{\beta} \tag{1}\]  
AF will be given as follows:  
\[Z=g(S) \tag{2}\]  
where \(g\) is the AF applied to the outcomes of Equation (1).  
The proposed ANN architecture is fully connected, meaning that every neuron in one layer is connected to every other layer's neurons. Moreover, it also underlines that more focus should be placed on how a given network's layer generates an output from a given input. Equation (3) summarizes the general equation for the generation of output for a given layer.  
\[\text{Output}=\text{Activation}(\boldsymbol{\alpha}(\boldsymbol{m}-1)\cdot \boldsymbol{y}) \tag{3}\]  
The equation applies to a single layer; however, the proposed architecture consists of an input layer, one hidden layer, and an output layer. The hidden layer processes the input layer's output using similar calculations. Binary cross-entropy is employed as the loss function, making it suitable for binary classification tasks where two output classes are predicted.  
\[L(\boldsymbol{\theta})=-\frac{1}{\boldsymbol{M}}{\sum_{i=1}^{M}}[\boldsymbol{ y}_{i}\text{log}\boldsymbol{f}(\boldsymbol{x}_{i})+(1-\boldsymbol{y}_{i}) \text{log}(1-\boldsymbol{f}(\boldsymbol{x}_{i}))] \tag{4}\]  
In the binary cross-entropy function, \(\boldsymbol{y}\) represents the actual label (1 for a positive heart attack case and 0 for a negative one), and \(\boldsymbol{f}(\boldsymbol{x}_{i})\) denotes the predicted probability of a positive case. The Adam optimizer [67] is employed to update the model's weights, offering an adaptive estimation of the first- and second-order moments. Adam is computationally efficient, resource-friendly, and particularly effective for large-scale datasets with numerous parameters. Figure 2 shows the proposed neural network architecture used in the study.  
Hyperparameter tuning plays a critical role in improving classification accuracy [68; 69]. While several techniques exist [70], no state-of-the-art method guarantees optimal tuning. In this research, the grid search technique [71] was employed to optimize hyperparameters for various ML models. Grid search involves testing multiple hyperparameter values to identify the best combination that yields the highest classification accuracy. The proposed ANN model utilizes the ReLU AF for input layers and a sigmoid AF for the output layer. It is trained with a batch size of 10 for 150 epochs, incorporating one hidden layer. To prevent overfitting, a dropout rate of 0.1 is applied. The model optimizes using the Adam optimizer and employs binary cross-entropy as the loss function for effective binary classification. The hyperparameters for all of the models are reported in Table 2.