## 3 Materials and Methods
### Evaluation Metric  
We evaluated the proposed models using five different metrics--accuracy, balanced accuracy (BAC), quadratic weighted kappa (QWK), precision, and F1-score (Table 4). This is because the models performed ordinal classification on an imbalanced dataset, which required a more rigorous evaluation than nominal classification on a balanced dataset. An imbalance in a dataset affects a model's decision owing to a bias toward a majority class [60; 61]. Accuracy becomes an unreliable measure in the presence of class imbalance because it can be improved by simply predicting all samples to the majority class. The BAC in multiclass classification is defined the same as the macro-recall, which is the average recall obtained from each class. The BAC is specialized for evaluating imbalanced datasets in multiclass classification, which considers all classes equal [62]. The BAC was approximately the same as the accuracy for a balanced dataset.  
In addition, a metric must consider the deviation between a prediction and the ground truth because age classes have an ordinal relationship. Nominal evaluation metrics penalize all misclassifications equally, assuming that classes have no ordinal relationship [63]. We used the ordinal metric QWK to compensate for accuracy and BAC in evaluating the ordinal classification. Quadratic weighted kappa is a modified version of [PERSON]'s kappa, which was developed to measure the degree of disagreement [64; 65]. Quadratic weighted kappa is a metric for ordinal problems because it considers the ordering of classes by assigning a weight to each prediction based on the closeness between the predicted and actual classes [64; 66]. Therefore, a failed prediction that is close to the ground truth is considered better than a misclassification that is far from the ground truth [66; 67]. In QWK, the weight is proportional to the square of distance. Previous studies have suggested that QWK is suitable for multiclass ordinal classification [68] and highly imbalanced datasets [69].  
In addition, we evaluated precision and F1-score using macro-average. The F1-score is defined as the harmonic mean of recall and precision. Because the macro F1-score is calculated based on class level and each class has the same weight, the minority class is equally important as the majority class in the F1-score evaluation. Therefore, F1-score is more suitable than accuracy when dealing with imbalanced data. We used BAC, QWK, and F1 as the primary measures of performance. Accuracy was reported as one of the standard metrics, although it can be misleading in an imbalanced dataset.  
We investigated how the prediction was affected by different RRI samples in the same person by evaluating the inter-sample reliability of age prediction using [PERSON]'s kappa. Two distinct 5 min RRI samples from the same subject were randomly selected without replacement and predicted age groups from these two samples were acquired. We repeated this process for all test subjects with two or more 5 min samples. Based on these results, we calculated [PERSON]'s kappa, which measured the agreement between two predictions obtained from the same subject. We employed the quadratic weights described in Table 4 for the calculations to account for the ordinal nature of the predictions. For the inter-sample reliability, we evaluated the kappa values based on the models using hybrid loss with ADASYN.