Cardiovascular diseases (CVDs) represent a significant global health concern, necessitating effective early detection methods. The advent of wearable electrocardiogram (ECG) devices offers the potential for enhanced portability and continuous monitoring. However, the substantial volume of data generated underscores the need for automated analysis techniques. This paper presents a framework for intra-subject clustering of ECG heartbeats, employing a robust P-QRS-T wave classifier. A Multiscale Convolutional Neural Network (CNN) in conjunction with a Bidirectional Gated Recurrent Network (bi-GRU) was developed for accurate wave delineation. The methodology involves a pipeline encompassing heartbeat segmentation, feature engineering using both manual descriptors and the Time Series Feature Extraction Library (TSFEL), and subsequent clustering via a k-means algorithm. The proposed wave classifier achieved good overall performance, with 99.68% accuracy in QRS complex identification. Furthermore, a novel ECG database, the Hi Database (HiDB), is introduced. It was acquired using the CompuGroup Medical (CGM) Hi 3-Leads ECG (Hi-ECG), a wearable three-lead device that was commercialised by CGM in collaboration with STMicroelectronics. Intra-subject clustering on the MITDB yielded a mean Adjusted Rand Index (ARI) of 0.78 ± 0.19 and a mean Silhouette Score of 0.65 ± 0.14. Application of the clustering approach to the HiDB resulted in an average Silhouette Score of 0.74 ± 0.13. The findings suggest that the presented framework holds promise for assisting clinicians in ECG annotation tasks and can be adapted to various ECG data sources, particularly those from wearable devices. The intrasubject approach to anomaly detection highlights the potential for personalised cardiac monitoring.
Intra-Subject Clustering of ECG Heartbeats from Wearable Devices using Deep Learning and Feature Engineering