Cardiac arrhythmias, characterized by irregular heartbeats, are difficult to diagnose in real-world scenarios. Machine learning has advanced arrhythmia detection; however, the optimal number of heartbeats for precise classification remains understudied. This study addresses this using machine learning while assessing the performance of arrhythmia detection across inter-patient and intra-patient conditions. Furthermore, the performance-resource trade-offs are evaluated for practical deployment in mobile health (mHealth) applications. Beat-wise segmentation and resampling techniques were utilized for preprocessing electrocardiography (ECG) signals to ensure consistent input lengths. A 1-D convolutional neural network was used to classify the eight multi-labeled arrhythmias. The dataset comprised real-world ECG recordings from the HiCardi wireless device alongside data from the MIT-BIH Arrhythmia database. Model performance was assessed through fivefold cross-validation under both inter-patient and intra-patient conditions. The proposed model demonstrated peak accuracy at four beats under inter-patient conditions, with minimal improvements beyond this point. This configuration achieved a balance between performance (94.82% accuracy) and resource consumption (training time: 72.27 s per epoch; prediction time: 155 μs per segment). Real-world simulations validated the feasibility of real-time arrhythmia detection for approximately 5000 patients. Utilizing four heartbeats as the input size for arrhythmia classification results in a trade-off between accuracy and computational efficiency. This discovery has significant implications for real-time wearable ECG devices, where both performance and resource constraints are crucial considerations. This insight is expected to serve as a valuable reference for enhancing the design and implementation of arrhythmia detection systems for scalable and efficient mHealth applications.
Supervised ECG-based sleep apnea detection typically depends on large and fully annotated datasets, yet the rarity and cost of labeling apneic events often lead to substantial annotation scarcity in practice. This study provides a controlled evaluation of how such scarcity degrades classification performance and, as a key contribution, investigates whether a constrained, morphology-preserving ECG augmentation framework can compensate for reduced apnea-label availability. Using the PhysioNet Apnea–ECG dataset, we simulated seven levels of label retention (–) and trained a lightweight CNN–BiLSTM model under both subject-dependent (SD) and subject-independent (SI) five-fold protocols. Offline augmentation was applied only to apnea segments and consisted of simple, physiologically motivated time-domain perturbations designed to retain realistic cardiac and respiratory dynamics. Across both evaluation settings, augmentation substantially mitigated performance loss in the low- and mid-scarcity regimes. Under SI evaluation, the mean F1-score improved from 0.57 to 0.72 at and from 0.63 to 0.76 at , with scores at – (0.75–0.77) approaching the full-label baseline of 0.79. Temporal and spectral analyses confirmed preservation of P–QRS–T morphology and respiratory modulation without distortion. These results demonstrate that simple and interpretable ECG augmentations provide an effective and reproducible baseline for data-efficient apnea screening and offer a practical path toward scalable annotation and robust single-lead deployment under label scarcity.
Background/Objectives: Supervised electrocardiography-based sleep apnea detection often depends on dense segment-level annotations, creating substantial expert burden. To reduce this dependence, we investigated whether adjacent temporal context could improve classification when ground-truth apnea labels are limited. Methods: We systematically evaluated five context lengths and seven apnea-label retention levels across 35 experimental configurations using participant-grouped five-fold cross-validation with three training repetitions. Results: The results demonstrated that using multi-window temporal context consistently improved classification performance across the evaluated apnea-label retention range. All multi-window configurations achieved higher mean F1-scores than the corresponding single-window baseline, with the best-performing multi-window setting at each retention level providing gains of 7.18–12.23 percentage points. Context length showed a clear overall effect on performance, whereas no systematic interaction was observed between context length and apnea-label retention. Targeted repeated-center and random-shuffle control experiments further supported a contribution from temporally adjacent ECG information rather than sequence-length expansion, repeated target presentation, or temporally distant same-recording context. Conclusions: Overall, leveraging adjacent temporal context provides a practical strategy for improving ECG-based apnea classification and may be particularly useful for developing screening models when dense expert-provided apnea annotations are limited.