Arrhythmia detection using electrocardiogram (ECG) signals requires an appropriate segmentation strategy to optimally represent cardiac morphological information. Although time-based windowing is widely applied in automated detection systems, the impact of window size variation on classification performance has not been systematically investigated. This study aims to evaluate the influence of different window sizes on arrhythmia detection performance using the K-Nearest Neighbors (KNN) algorithm. The dataset consists of 48 records from the MIT-BIH Arrhythmia Database sampled at 360 Hz. ECG signals were preprocessed using a 0.5–50 Hz bandpass filter and segmented with window sizes of 180, 360, 720, and 1000 samples using 50% overlap. Time-domain statistical features were extracted and used as input to the classification model. Experimental results indicate that the 180-sample window achieved the best performance, with an accuracy of 89.58% and an F1-score of 83.27%. These findings suggest that shorter segmentation windows increase training data density and are more suitable for distance-based classifiers such as KNN. This study highlights that window size selection is a critical parameter in arrhythmia detection system design and should be aligned with the characteristics of the classification algorithm employed.
Copyrights © 2026