## 4 Results and Discussion
### Experiment 2: Evaluation of the Proposed Method on Cross-Database  
In Experiment 2, we employed two distinct databases to verify the usability of the PI-BSM-based classification, particularly when the target dataset does not provide beat annotations. The MIT-BIH dataset was selected as the source dataset to use beat annotations, while the SPH dataset was chosen as the target dataset to classify arrhythmia rhythms. The PI-beat classifier was pre-trained to distinguish the 15 types of beats provided by the MIT-BIH dataset. The  
Figure 5: (**a**) depicts the normal rhythm, while (**b**) illustrates the AFib rhythm. The first row displays the 1D ECG signals derived from different patients in the MITBIH dataset. The second and third rows portray the baseline nBSM and PI-BSM transformed from each 1D ECG signal. The difference between normal and AFib rhythms may not be apparent in n-BSM images, but it becomes distinct in PIBSM images. target dataset ECG signal was converted to scalograms and input into the pre-trained PI-beat classifier to generate PI-BSM images, followed by classifying the rhythms. Two preprocessing steps were additionally applied for the SPH dataset, namely missing-value exclusion and resampling. By conducting missing-value exclusion, only 10,588 samples were used in the analysis. Also, the ECG samples from the SPH dataset were resampled to 360 Hz to synchronize with the samples from the MIT-BIH dataset. In Table 4, the number and types of samples in the SPH dataset are presented, both before and after preprocessing. Several rhythms have a limited quantity of data, which is unsuitable for training a deep-learning model. To address the data imbalance problem, the original 11 rhythm types were merged and created into 4 different rhythm types (AFib, GSVT, SB, and SR) based on the guidelines [33]. As all samples in the SPH dataset were from different patients, dataset partitioning was performed without considering patient labels, and 5-fold cross-validation was used for inter-patient evaluation. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Merged Rhythm**} & \multirow{2}{*}{**Rhythm**} & \multicolumn{4}{c}{**Number of Samples**} \\ \cline{3-8}  & & \multicolumn{2}{c}{**Before Preprocessing**} & \multicolumn{2}{c}{**After Preprocessing**} \\ \hline \multirow{3}{*}{AFIB} & Atrial Flutter & 445 & \multirow{3}{*}{2225} & 438 & \multirow{3}{*}{2218} \\ \cline{2-2} \cline{5-8}  & Atrial Fibrillation & 1780 & & & 1780 & \\ \hline \multirow{6}{*}{GSVT} & Atrial Tachycardia & 121 & \multirow{6}{*}{16} & \multirow{6}{*}{16} & \multirow{6}{*}{2260} \\ \cline{1-1} \cline{3-8}  & Atrioventricular Node & & & & & \\ \cline{1-1} \cline{3-8}  & Reentrant Tachycardia & & & & & \\ \cline{1-1} \cline{3-8}  & Atrioventricular Reentrant & \multirow{2}{*}{8} & \multirow{2}{*}{2307} & \multirow{2}{*}{8} & \multirow{2}{*}{2260} \\ \cline{1-1} \cline{3-8}  & Tachycardia & & & & & \\ \cline{1-1} \cline{3-8}  & Sinus Atrium to Atrial & \multirow{2}{*}{7} & \multirow{2}{*}{7} & \multirow{2}{*}{7} & \multirow{2}{*}{7} \\ \cline{1-1} \cline{3-8}  & Wandering Rhythm & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Number of samples in SPH dataset before and after preprocessing. Figure 6: Confusion matrix of (**a**) baseline n-BSM and (**b**) PI-BSM using the MIT-BIH dataset. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Normal Rhythm**} & \multicolumn{3}{c}{**AFib Rhythm**} & \multicolumn{3}{c}{**Overall**} \\ \hline \multirow{3}{*}{Baseline PI-BSM} & **Pre** & **Sen** & **F1** & **Pre** & **Sen** & **F1** & **F1** & **Acc** \\ \hline Baseline & 87.7 & 90.3 & 89.0 & 64.0 & 57.9 & 61.0 & 75.0 & 83.2 \\ PI-BSM & 94.1 & 92.6 & 93.4 & 75.8 & 80.0 & 77.9 & 85.7 & 89.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performance comparison with previous studies and our proposed method in the MIT-BIH dataset. In the subsequent subsections, we performed three analyses.