Detecting Atrial Fibrillation from ECG Signals with 1D CNNs
Atrial fibrillation (AF) is a common arrhythmia that increases stroke risk if undetected. In this project I worked with ECG segments from the MIT-BIH dataset to classify AF patterns.
Pipeline overview
- Extract and preprocess ECG waveforms
- Engineer time-domain and frequency features for classical models
- Train a 1D CNN on raw or minimally processed segments
- Compare precision/recall across approaches
Classical vs deep learning
Random Forest and SVM baselines with hand-crafted features remain strong when data is limited and interpretability matters. 1D CNNs can learn temporal motifs directly but need careful regularization to avoid overfitting on small medical datasets.
Lessons
- Signal quality and segment alignment dominate model choice
- Class imbalance requires weighted loss or resampling
- Clinical deployment would need rigorous external validation, not just test-set metrics