## 4 Results
### Evaluation  
Classification metrics, including accuracy, sensitivity, specificity, F1 score, and Matthews correlation coefficient (MCC), were used for the quantitative evaluation of the algorithms. Accuracy is the proportion of correct predictions across the total test dataset. Sensitivity is the proportion of AF-deficient students correctly identified as positive, and specificity is the proportion of non-AF patients correctly identified as negative. The F1 score measures the harmonic mean of the precision and recall, i.e., it denotes the balance between the rates of type-1 and type-2 errors. Recent findings show that the MCC can be a more reliable metric, as its score is dependent on all four quadrants of the confusion matrix, i.e., true positives, false negatives, true negatives, and false positives, proportional to both classes [78]. The final properties of the model for the purpose of replication by the research community are provided in Table 3. In addition to the proposed model, we also implemented convolution-focused and LSTM-focused variants, and the results are elucidated in Table 4. A random search algorithm was the hyperparameter selection method used for deciding an appropriate number of convolutional filters, LSTM units, and fully connected layer neurons for the range [4, 8, 16, 32, 64, 128, 256]. After the value of \(\approx\)32, noticeably, the tendency to overfit dramatically increased for all models and did not yield a significant increase in performance (less than 1%). It is worth mentioning that our proposed model for ECG classification appeared to take full advantage of the attention mechanism and the HRV features to elicit an average \(\approx\)6% improvement across all metrics. For the ECG model, the batch size used for training was 32, and the number of epochs was 25. For the same larger ECG model (_teacher_) fine-tuned on the PPG dataset, the batch size used for training was 16 with 40 epochs. When applying TL, the teacher only ever sees the ECG data in a pre-training context and only one signal type at a time. To provide a fair comparison, a model of the same size as the _teacher_ was trained from scratch using the PPG datasets as well, with a batch size of 16 and 40 epochs. Finally, the _student_ model that was reduced by a factor of 32 was trained with a batch size of 16 for 30 epochs using KD and from scratch. Early stopping and automated reduction of the learning rate by a factor of 0.5 upon a plateau in the validation loss were implemented as callbacks during training for all aforementioned processes. We rationalize the CNN-BiLSTM architecture performance as follows: CNNs capture spatial features such as shapes, patterns, peaks, and troughs (i.e., low level), whereas LSTM captures temporal dependencies and sequential information (i.e., high level), so there is better representation capability. Tables 5 and 6 report the metrics for the TL and KD experiments on the UMass-DB and MIMIC-III PPG datasets, respectively. The application of TL resulted in an average \(\approx\)48% improvement across all metrics on the small PPG dataset compared to the baseline _teacher_, indicating that the AF versus NSR representation is indeed transferable to some degree. After using TL and KD in conjunction, the student model that was 32x smaller than the _teacher_ achieved average performance boosts of \(\approx\)13.6% and \(\approx\)1.38% across all metrics on each dataset. Note that the accuracy and specificity were higher than the other metrics due to the class imbalance in favor of the NSR majority. High specificity indicates a high true negative rate, making the model efficient in correctly identifying NSR rhythms. We observed that the average standard deviation across both PPG datasets also decreased by \(\approx\)4% and 1%, respectively.