Comparison of Filter and SHAP Feature Selection for ECG-based Atrial Fibrillation Classification

Novie Theresia Pasaribu, Elizabeth Fabiola Wijaya, Che Wei Lin

Abstract


Atrial Fibrillation (AF) is a type of arrhythmia whose prevalence continues to rise globally and can lead to serious complications such as stroke and heart attack. Early detection based on ECG signals is therefore crucial. This study compares three feature selection methods, namely Pearson Correlation (PC), Mutual Information (MI), and Shapley Additive Explanations (SHAP), for classifying AF from 2-lead ECG signals using XGBoost. The dataset used was the MIT-BIH Atrial Fibrillation Database, comprising 23 ECG recordings, yielding 34,312 10-second data segments. Preprocessing used Stationary Wavelet Transform (SWT) and Min-Max normalisation. A total of 50 features were extracted. Each method was tested on 4 feature subset sizes (5, 10, 15, and 20 features). The model was optimised using GridSearchCV with 5-fold Stratified Cross-Validation. Results showed that SHAP outperformed PC and MI in subsets of 10, 15, and 20 features. SHAP with 20 features achieved the highest performance (97.87% accuracy; F1 score 96.78%; ROC-AUC 0.9971), while the 15-feature SHAP offered the best performance–dimensionality trade-offs: 97.84% accuracy, 97.85% precision, 95.62% recall, 96.72% F1-score, and 0.9965 ROC-AUC, with a 70% dimensional reduction (0.03% below SHAP-20 on accuracy, with higher precision). SHAP's superiority over PC and MI was statistically significant (McNemar and DeLong tests, p < 0.05) in subsets of 15 and 20 features; SHAP with 20 features achieved a ROC-AUC that did not differ significantly from the baseline of 50 features (DeLong test, p = 0.4997).

Keywords


Atrial Fibrillation; Feature Selection; SHAP, ECG Signals; XGBoost

Full Text:

PDF

References


REFFERENSI

S. C. W. Tan, M.-L. Tang, H. Chu, Y.-T. Zhao, and C. Weng, “Trends in Global Burden and Socioeconomic Profiles of Atrial Fibrillation and Atrial Flutter: Insights from the Global Burden of Disease Study 2021,” CJC Open, vol. 7, no. 3, pp. 247–258, Mar. 2025, doi: 10.1016/j.cjco.2024.11.017.

V. Fuster et al., “ACC/AHA/ESC 2006 Guidelines for the Management of Patients With Atrial Fibrillation,” Journal of the American College of Cardiology, vol. 48, no. 4, pp. e149–e246, Aug. 2006, doi: 10.1016/j.jacc.2006.07.018.

K. Miyazawa and G. Yh. Lip, “Atrial fibrillation,” Medicine, vol. 46, no. 10, pp. 627–631, Oct. 2018, doi: 10.1016/j.mpmed.2018.07.009.

R. Sharmin, M. C. Brindise, J. J. Kolliyil, B. A. Meyers, J. Zhang, and P. P. Vlachos, “Novel interpretable Feature set extraction and classification for accurate atrial fibrillation detection from ECGs,” Computers in Biology and Medicine, vol. 179, p. 108872, Sep. 2024, doi: 10.1016/j.compbiomed.2024.108872.

D. A. Cook, S.-Y. Oh, and M. V. Pusic, “Accuracy of Physicians’ Electrocardiogram Interpretations: A Systematic Review and Meta-analysis,” JAMA Intern Med, vol. 180, no. 11, p. 1461, Nov. 2020, doi: 10.1001/jamainternmed.2020.3989.

S. L. Joshi, R. A. Vatti, and R. V. Tornekar, “A Survey on ECG Signal Denoising Techniques,” in 2013 International Conference on Communication Systems and Network Technologies, Gwalior: IEEE, Apr. 2013, pp. 60–64. doi: 10.1109/CSNT.2013.22.

C. Guan et al., “Interpretable machine learning model for new-onset atrial fibrillation prediction in critically ill patients: a multi-center study,” Crit Care, vol. 28, no. 1, p. 349, Oct. 2024, doi: 10.1186/s13054-024-05138-0.

B. B.-S. Chuang and A. C. Yang, “Optimization of Using Multiple Machine Learning Approaches in Atrial Fibrillation Detection Based on a Large-Scale Data Set of 12-Lead Electrocardiograms: Cross-Sectional Study,” JMIR Form Res, vol. 8, p. e47803, Mar. 2024, doi: 10.2196/47803.

C. M. Bhatt, P. Patel, T. Ghetia, and P. L. Mazzeo, “Effective Heart Disease Prediction Using Machine Learning Techniques,” Algorithms, vol. 16, no. 2, p. 88, Feb. 2023, doi: 10.3390/a16020088.

I. Guyon and A. Elisseeff, “An Introduction to Variable and Feature Selection”.

K. Cao et al., “Prediction of cardiovascular disease based on multiple feature selection and improved PSO-XGBoost model,” Sci Rep, vol. 15, no. 1, p. 12406, Apr. 2025, doi: 10.1038/s41598-025-96520-7.

J. Li et al., “Feature Selection: A Data Perspective,” ACM Comput. Surv., vol. 50, no. 6, pp. 1–45, 2017, doi: 10.1145/3136625.

H. Wang, Q. Liang, J. T. Hancock, and T. M. Khoshgoftaar, “Feature selection strategies: a comparative analysis of SHAP-value and importance-based methods,” J Big Data, vol. 11, no. 1, p. 44, Mar. 2024, doi: 10.1186/s40537-024-00905-w.

H. Gong, Y. Li, J. Zhang, B. Zhang, and X. Wang, “A new filter feature selection algorithm for classification task by ensembling pearson correlation coefficient and mutual information,” Engineering Applications of Artificial Intelligence, vol. 131, p. 107865, May 2024, doi: 10.1016/j.engappai.2024.107865.

J. R. Vergara and P. A. Estévez, “A Review of Feature Selection Methods Based on Mutual Information,” Neural Comput & Applic, vol. 24, no. 1, pp. 175–186, Jan. 2014, doi: 10.1007/s00521-013-1368-0.

S. Lundberg and S.-I. Lee, “A Unified Approach to Interpreting Model Predictions,” Nov. 25, 2017, arXiv: arXiv:1705.07874. doi: 10.48550/arXiv.1705.07874.

A. V. Ponce‐Bobadilla, V. Schmitt, C. S. Maier, S. Mensing, and S. Stodtmann, “Practical guide to SHAP analysis: Explaining supervised machine learning model predictions in drug development,” Clinical Translational Sci, vol. 17, no. 11, p. e70056, Nov. 2024, doi: 10.1111/cts.70056.

O. Heriana and A. M. Al Misbah, “Comparison of Wavelet Family Performances in ECG Signal Denoising,” indones.j.electron.telecommun., vol. 17, no. 1, p. 1, Aug. 2017, doi: 10.14203/jet.v17.1-6.

S. Mandala, A. R. Pratiwi Wibowo, Adiwijaya, Suyanto, M. S. M. Zahid, and A. Rizal, “The Effects of Daubechies Wavelet Basis Function (DWBF) and Decomposition Level on the Performance of Artificial Intelligence-Based Atrial Fibrillation (AF) Detection Based on Electrocardiogram (ECG) Signals,” Applied Sciences, vol. 13, no. 5, p. 3036, Feb. 2023, doi: 10.3390/app13053036.

A. Géron, Hands-on machine learning with scikit-learn, keras, and TensorFlow: Concepts, tools, and techniques to build intelligent systems, 3rd ed. O’Reilly Media, 2022.

J. Pan and W. J. Tompkins, “A Real-Time QRS Detection Algorithm,” IEEE Trans. Biomed. Eng., vol. BME-32, no. 3, pp. 230–236, Mar. 1985, doi: 10.1109/TBME.1985.325532.

P. Hamilton, “Open source ECG analysis,” in Computers in Cardiology, Memphis, TN, USA: IEEE, 2002, pp. 101–104. doi: 10.1109/CIC.2002.1166717.

M. Shen, L. Zhang, X. Luo, and J. Xu, “Atrial Fibrillation Detection Algorithm Based on Manual Extraction Features and Automatic Extraction Features,” IOP Conf. Ser.: Earth Environ. Sci., vol. 428, no. 1, p. 012050, Jan. 2020, doi: 10.1088/1755-1315/428/1/012050.

R. Battiti, “Using mutual information for selecting features in supervised neural net learning,” IEEE Trans. Neural Netw., vol. 5, no. 4, pp. 537–550, Jul. 1994, doi: 10.1109/72.298224.

A. Kraskov, H. Stoegbauer, and P. Grassberger, “Estimating Mutual Information,” Phys. Rev. E, vol. 69, no. 6, p. 066138, Jun. 2004, doi: 10.1103/PhysRevE.69.066138.

S. M. Lundberg et al., “From local explanations to global understanding with explainable AI for trees,” Nat Mach Intell, vol. 2, no. 1, pp. 56–67, Jan. 2020, doi: 10.1038/s42256-019-0138-9.

T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Aug. 2016, pp. 785–794. doi: 10.1145/2939672.2939785.

Q. A. Hidayaturrohman and E. Hanada, “A Comparative Analysis of Hyper-Parameter Optimization Methods for Predicting Heart Failure Outcomes,” Applied Sciences, vol. 15, no. 6, p. 3393, Mar. 2025, doi: 10.3390/app15063393.

Q. McNemar, “Note on the Sampling Error of the Difference Between Correlated Proportions or Percentages,” Psychometrika, vol. 12, no. 2, pp. 153–157, Jun. 1947, doi: 10.1007/BF02295996.

E. R. DeLong, D. M. DeLong, and D. L. Clarke-Pearson, “Comparing the Areas under Two or More Correlated Receiver Operating Characteristic Curves: A Nonparametric Approach,” Biometrics, vol. 44, no. 3, p. 837, Sep. 1988, doi: 10.2307/2531595.




DOI: https://doi.org/10.37905/jjeee.v8i2.39633

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Published by:
Electrical Engineering Department
Faculty of Engineering
State University of Gorontalo
Jalan B.J.Habibie Desa Moutong Kecamatan Tilongkabila Kabupaten Bone Bolango
Telp. 0435-821175; 081340032063
Email: [email protected]/[email protected]

Creative Commons License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.