Analysis of the Window Size Effect for T-Wave Alternans Detection through Machine Learning Methods

Lidia Pascual-Sánchez1, Rebeca Goya-Esteban2, Fernando Cruz-Roldán1, Antonio Hernández-Madrid3, Manuel Blanco-Velasco4
1University of Alcalá, 2Universidad Rey Juan Carlos, 3Arrhythmia Unit, Ramón y Cajal Hospital, University of Alcalá, 4University of Alcala


Abstract

T-wave alternans (TWA) is a recognized phenomenon observed in the electrocardiogram (ECG), characterized by a consistent fluctuation of the ventricular repolarization amplitude, duration, or waveform occurring on an every-other-beat basis. These episodes are regarded as a marker of high risk of ventricular vulnerability and sudden cardiac death, among other pathological conditions. Numerous analysis strategies have been introduced to detect and estimate TWA in the ECG automatically. However, their validation is a challenging task due to the lack of a gold standard to benchmark detection approaches. Detection of TWA on ambulatory recordings remains an open issue, so this work addresses this problem using learning methods. A set of Machine Learning (ML) models, namely Random Forest (RF), K-Nearest-Neighbors (KNN), and Decision Trees (DT) are fed with features extracted from three representative TWA detection methods, namely the Spectral Method, the Modified Moving Average and the Time Method. Since ambulatory ECG exhibits high variability in the middle-term, this work investigates the impact that the analysis window size has in the classification problem, so, short-term frames of heartbeats (hb) with different sizes are considered. An ensemble dataset of 750 instances belonging to 30 patients, where real ECG signals have artificial TWA episodes added to them was utilized. To assess the performance of the ML models, a 5-fold cross-validation process is conducted, followed by a patient permutation using the test set. Test results indicate that longer windows of heartbeats, specifically 40 per instance, demonstrate a better performance compared to windows of 30 and exhibit larger discrepancies relative to smaller windows such as the 20-heartbeat one. All three classification models yield comparable scores and can learn from signal excerpts of varying lengths to identify alternant waves of 35 uV.