Engineering Science and Technology an International Journal
Improving cross-database generalization of heartbeat classification through ECG dataset aggregation and multi-domain feature selection
By Manel Labdi, Mohamed Daoud, Mohamed Bentoumi and 1 others.
Abstract
Unlike conventional arrhythmia classification methods designed for single-dataset evaluation, this study specifically addresses the challenges of cross-database generalization under heterogeneous ECG distributions. A systematic and controlled cross-database evaluation protocol is proposed to investigate the respective effects of data diversity and training data volume on classification performance and generalization. The heartbeat classification framework is based on ECG features extracted from several domains, including morphological descriptors, temporal features, wavelet-based frequency information, statistical measures, and autoregressive coefficients, thereby providing a comprehensive representation of heartbeat patterns. To reduce feature redundancy and improve discriminative capability, a minimum redundancy–maximum relevance (mRMR) feature selection strategy is employed to construct compact and informative feature subsets. Several interpretable machine learning classifiers, including linear and radial basis function support vector machines (SVM), k-nearest neighbors (KNN) and decision trees, are evaluated using optimized hyperparameters obtained through grid search. Cross-database generalization is assessed through extensive cross-database experiments involving three heterogeneous ECG datasets and four heartbeat classes. Experimental results demonstrate that models trained and tested on the same dataset achieve high intra-dataset accuracy but suffer significant performance degradation when evaluated on unseen databases due to distributional shifts. To improve cross-database generalization, a multi-source training strategy is investigated by aggregating samples from different ECG databases. Furthermore, controlled experimental scenarios are designed to independently assess the respective effects of training data volume and inter-dataset diversity, while a quantitative analysis of feature-space distribution shifts links the observed classification performance to the statistical similarity between the training and target datasets. The results reveal that cross-database performance is primarily governed by statistical similarity rather than by training data volume alone. In particular, linear SVM classifiers exhibit superior robustness to distribution shifts, whereas distance-based classifiers such as KNN are considerably more sensitive to changes in feature-space distributions. The experimental results show that classification accuracies exceed 98%, reaching over 99% in the most favorable cross-database configurations. Overall, the study demonstrates that carefully designed classical machine learning methods can provide strong cross-database generalization without relying on complex deep learning architectures, while offering practical insights through a systematic and quantitatively validated cross-database evaluation protocol.






