## 4 Results and Discussion  
As mentioned earlier, the two datasets used in the conducted experiments were prepared from the MIT-BIH and BIDMC databases. Details of the setup of the conducted experiments for the datasets are shown in Table 1 below. The MIT-BIH dataset contains 10,000 samples equally distributed among five classes. Each sample has a vector of length 187. The second dataset, MIT-BIH + BIDMC, has 11,790 samples, which are also equally distributed among three classes. These samples have a vector of length 500. Eighty percent of each dataset (8000 and 9432 samples, respectively) are used for training, and the remaining twenty percent (2000 and 2358 samples, respectively) are used for testing.  
For the evaluation of the model, we used confusion matrices to calculate various performance metrics for our models. These confusion matrices contain information about how well the models classified different types of samples. For each class, we calculated  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Datasets** & **No. of Classes** & **No. of Samples** & **Train** & **Test** & **Sample Length** & **Sample in Sec** & **Classes** \\ \hline MIT-BIH & 5 classes & 10,000 & 8000 & 2000 & 187 & 1.46 & N, S, V, F, Q \\ MIT-BIH + BIDMC & 3 classes & 11,790 & 9432 & 2358 & 500 & 3.90 & ARR, SNR, CHF \\ \hline \hline \end{tabular}
\end{table}
Table 1: Details of the two datasets used in the training and evaluation of the proposed model.  
Figure 8: Detailed block diagram of the proposed 3-channel fusion-based CNN + GRU model. \(N=3\) or 5 classes depending on the dataset used.  
the positive samples that the model correctly identified (true positives--TPs), the negative samples that the model correctly identified (true negatives--TNs), the negative samples that the model incorrectly classified as positive (false positives--FPs), and the positive samples that the model incorrectly classified as negative (false negatives--FNs). Using these values, we then calculated the overall performance metrics for the model:  
_Accuracy_ (Equation (1)): this represents the overall proportion of correctly classified samples.  
_Precision_ (Equation (2)): this measures how good the model is at identifying true positives without mistakenly including false positives.  
_Recall_ (Equation (3)): this measures how good the model is at identifying all true positives and avoiding false negatives.  
_F1-Score_ (Equation (4)): this is a harmonic mean that combines both precision and recall into a single metric.  
By calculating these metrics, we can gain a comprehensive understanding of the model's strengths and weaknesses in classifying different types of samples [41].  
\[Accuracy=\frac{TP+TN}{TP+TN+FP+FN} \tag{1}\]  
\[Precision=\frac{TP}{TP+FP} \tag{2}\]  
\[Recall=\frac{TP}{TP+FN} \tag{3}\]  
\[F1-Score=\frac{2\times Precision\times Recall}{Precision+Recall} \tag{4}\]  
All the models were programmed and experiments were conducted for this research using Python 3.10.14 in the user-friendly cloud environment Kaggle, a subsidiary of Google. TensorFlow, a popular library for machine learning, and Keras, a high-level interface for TensorFlow, were used to build and evaluate the CNN + GRU models.