Implantable cardioverter defibrillator (ICD) implantation for the primary prevention of sudden cardiac death (SCD) is often indicated in heart-failure (HF) patients, especially if the left ventricular ejection fraction (LVEF) is <35%. Oftentimes, the device never comes into operation, highlighting the aspecificity of the implantation criterium. Given the tendency of HF pa-tients to have increased values of electrocardiographic alternans (ECGA; an index of cardiac instability), the aim of the current study is to assess wheth-er ECGA can be an additional parameter to LVEF for the correct identifica-tion of HF patients who will experience serious ventricular arrhythmias and truly benefit from the ICD. We analyzed ECGA using the enhanced adaptive matched filter method (EAMFM) in the Leiden University Medical Center database of primary prevention ICD patients undergoing a bicycle ergometer test. According to their follow-up, patients were categorized into two groups: those with serious arrhythmias and ICD therapy (cases, N=40) and those without (controls, N=82). The ECGA features were used to feed five different machine-learning algorithms (i.e., Decision Tree-DT, Logistic Re-gression-LR, Naïve Bayes-NB, Linear Discriminant Analysis-LDA, Support Vector Machine-SVM), and their sensitivity (Se), specificity (Sp) and F1 score (F1) were assessed. Se, Sp and F1 were 94%, 84% and 93% for DT (with 624 true positives and 252 true negatives), 90%, 42% and 83% for LR (with 595 true positives and 125 true negatives), 84%, 33% and 79% for NB (with 561 true positives and 100 true negatives), 89%, 42% and 83% for LDA (with 593 true positives and 125 true negatives), 98%, 83% and 96% for SVM (with 654 true positives and 250 true negatives), respectively. Thus, SVM was the most suitable algorithm, followed by DT and LR. In conclusion, results indicate that ECGA represents a potentially useful tool to identify patients benefiting from ICD implantation. Further investigations are needed.