# Comparison of Dimensionality Reduction Approaches and Logistic Regression for ECG Classification
## 2 Dataset Description and Processing  
The ECG dataset used in this study was sourced from Chapman University and Shaoxing People's Hospital (SPH) [5]. It consists of 10,646 labeled 12-lead ECG recordings, each sampled at 500 Hz over a duration of 10 s. These recordings are annotated with 1 of 11 cardiac rhythm classes and are accompanied by patient metadata such as age and diagnosis. The dataset includes both raw ECG signals and pre-extracted clinical features. In this work, we focus on a set of 11 derived features provided directly within the dataset, which serve as clinically meaningful summaries of cardiac activity. These include (1) QRS complex count, (2) atrial beat frequency, (3) ventricular beat frequency, (4) Q-wave onset, (5) Q-wave offset, (6) R-wave peak, (7) S-wave offset, (8) T-wave onset, (9) T-wave offset, (10) average RR interval, and (11) QT interval duration. All these features were used as input variables for the classification models. These engineered features were selected for their clinical interpretability and were precomputed by domain experts as part of the SPH dataset documentation. Table 1 presents the distribution of patients across the 11 rhythm classes, along with age statistics. Among the records, 17.15% were labeled as SR, while the remaining 82.85% correspond to various arrhythmias. The five rhythms retained for classification in this study--SB, SR, AFIB, ST, and SVT--were selected based on clinical relevance and class prevalence. Rarer classes such as AV re-entrant tachycardia or sinus to atrial wandering rhythm were excluded due to insufficient representation for robust model training. Given the class imbalance, particularly the under-representation of certain arrhythmias, it was essential to ensure a representative allocation across training and testing phases. To address this, we performed a stratified data split, allocating 60% of the samples for training and 40% for testing, while preserving the original class proportions. This ensures that minority classes are adequately represented during model training and evaluation. We did not apply oversampling or undersampling methods, opting instead for stratification to maintain the integrity of the dataset. While oversampling and undersampling techniques can improve balance, we opted to preserve the original data distribution to avoid introducing synthetic bias. All numeric features were standardized to have zero mean and unit variance using z-score normalization. This preprocessing step was applied to the entire dataset before performing the train-test split. This step reduces scale-related bias and ensures consistent convergence during model fitting. Standardization was conducted on the entire dataset prior to splitting to ensure consistent scaling of all features and comparability across folds. Subsequently, training data were used to build the classification models, while the test data were reserved exclusively for model evaluation. Figure 1 presents an overview of the full analytical pipeline, including preprocessing, dimensionality reduction, classification, and model evaluation. To further contextualize the classification task, Figure 2 provides a visual comparison between two representative ECG signal segments: one for SR and another for AFIB. The distinct morphological patterns in P-QRS-T sequences illustrate the need for reliable, feature-based discrimination.