Prediction of Atrial Fibrillation using electrocardiograms from the Saitama Heart Database: A Machine Learning Approach
2026 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE credits
Student thesis
Abstract [en]
Atrial fibrillation (AF) is the most common sustained cardiac arrhythmia worldwide, signifi-cantly raising the risk of stroke, heart failure, and mortality. Early identification is crucial,yet paroxysmal AF, which occurs in brief, often asymptomatic episodes frequently goesundetected during routine clinical visits, as standard short ECGs are unlikely to capture anintermittent arrhythmia. This creates a dangerous diagnostic gap: patients may suffer anAF-related stroke before the underlying condition is ever identified.This thesis proposes a machine learning pipeline for predicting Paroxysmal AtrialFibrillation (PAF) risk from normal sinus rhythm ECG, without requiring the observationof any AF episode. Using the Saitama Heart Database of Atrial Fibrillation (SHDB-AF), a publicly available Japanese Holter ECG database with beat-level manual rhythmannotations, we extract time-domain, frequency-domain, and nonlinear heart rate variability(HRV) features from 10-minute AF-free windows using the Python NeuroKit2 library. ARandom Forest classifier with recursive feature elimination (RFECV) and patient-levelmajority voting is trained to distinguish PAF patients from non-AF patients based solely ontheir normal-rhythm HRV profile.All evaluations are performed under Leave-One-Subject-Out cross-validation to ensurethat reported results reflect genuine generalisation to unseen patients. The final modelachieves a patient-level AUC of 0.911, a macro F1-score of 0.90, a PAF sensitivity of 95%,and a specificity of 85% across 40 patients (20 PAF, 20 non-AF). Nonlinear HRV features,particularly DFA alpha1, the Cardiac Sympathetic Index (CSI), and the SD1/SD2 ratioemerge as the most discriminative predictors, consistent with the hypothesis that PAFpatients exhibit chronic autonomic dysregulation detectable during sinus rhythm.The proposed clinical workflow, a short ECG at the point of care, accompanied byalgorithmic risk stratification, followed by selective referral for extended Holter monitoringhas the potential to substantially improve PAF detection rates before the condition manifestsas stroke, offering a practical and interpretable complement to existing deep learningapproaches for AF management.
Place, publisher, year, edition, pages
2026. , p. 37
Keywords [en]
Machine Learning, Atrial Fibrillation, Random Forest, LOSO, ECG, GroupKFold, HRV, prediction
National Category
Medical and Health Sciences Cardiology and Cardiovascular Disease
Identifiers
URN: urn:nbn:se:mau:diva-86974OAI: oai:DiVA.org:mau-86974DiVA, id: diva2:2084675
Educational program
TS Computer Science: Applied Data Science
Supervisors
Examiners
2026-07-082026-07-062026-07-08Bibliographically approved