ECG-Based Arrhythmia Classification in Students Using Random Forest: A Case Study with Class Imbalance Analysis

Authors

  • Adya Zizwan Putra Universitas Prima Indonesia
  • Ariyanto Sitorus Universitas Prima Indonesia
  • Paulus Anggiat Ruben Simanjuntak Universitas Prima Indonesia
  • Mega Cristin Angelina. H. Universitas Prima Indonesia
  • Kevin Agustino Situmorang Universitas Prima Indonesia

DOI:

10.33395/sinkron.v9i2.14793

Keywords:

Arrhythmia; Electrocardiogram; Data Labeling; Random Forest; SMOTE

Abstract

Arrhythmia is a heart rhythm disorder that can indicate a student’s heart health status. This research aims to develop a Random Forest model to classify arrhythmia in students based on ECG signals. ECG data was collected from 100 students at SMK Swasta Teladan Sumatera Utara 2 after learning activities. The extracted signal features include RR interval, PR interval, QRS duration, QT interval, ST segment, beats per minute (BPM) and R/S ratio. Data labeling was carried out manually by the researchers based on the range of ECG feature values that had been determined by the doctor for each class: Normal, Abnormal, Potential Arrhythmia and Very Potential Arrhythmia. The dataset is divided into 70% for training and 30% for testing. SMOTE is applied to address class imbalance. The model achieved 80% accuracy with the best performance in normal class with precision, recall and f1-score  of  94%. However, no samples were identified for Potential Arrhythmia class, as there were no extracted feature values that met the criteria set by the doctor, so model could neither learn nor make predictions for this category, even after applying balancing methods such as SMOTE. For further research, based on these findings, it highlights the need for balanced class representation and expert-guided labeling to improve the performance of ECG -based arrhythmia classification.

GS Cited Analysis

Downloads

Download data is not yet available.

References

Al-Shammary, Dhiah, Mustafa Noaman Kadhim, Ahmed M. Mahdi, Ayman Ibaida, and Khandakar Ahmed. 2024. “Efficient ECG Classification Based on Chi-Square Distance for Arrhythmia Detection.” Journal of Electronic Science and Technology 22(2). doi:10.1016/j.jnlest.2024.100249.

Anbalagan, Thivya, Malaya Kumar Nath, D. Vijayalakshmi, and Archana Anbalagan. 2023. “Analysis of Various Techniques for ECG Signal in Healthcare, Past, Present, and Future.” Biomedical Engineering Advances 6:100089. doi:10.1016/j.bea.2023.100089.

Ansari, Yaqoob, Omar Mourad, Khalid Qaraqe, and Erchin Serpedin. 2023. “Deep Learning for ECG Arrhythmia Detection and Classification: An Overview of Progress for Period 2017–2023.” Frontiers in Physiology 14.

Data Pokok Pendidikan (DAPODIK) Direktorat Jenderal Pendidikan Anak Usia Dini, Pendidikan Dasar dan Pendidikan Menengah Kementerian Pendidikan Dasar dan Menengah. 2025. https://dapo.dikdasmen.go.id/sekolah/2EDAE0CCE0B6BA1B89C2.

Dwi Muthohhar, Jalis, and Agus Prihanto. 2023. “Analisis Perbandingan Algoritma Klasifikasi Untuk Penyakit Jantung.” Journal of Informatics and Computer Science 04.

Farell, E., & Al. (n.d.). “Classification of Arrhythmia Potential using the K-Nearest Neighbor Algorithm,” https://www.internetworkingindonesia.org/index.php/iij/article/view/49.

Given Hamonangan, Jonathan, Anita Sofia Rahmi, Sean Julius Lase, Nendi Suhendi Syafei, and Arjon Turnip. 2024. “JIIF (Jurnal Ilmu Dan Inovasi Fisika) DETEKSI DINI ARITMIA MENGGUNAKAN K-NEAREST NEIGHBOUR.” 08(01):86–95. doi:10.24198/jiif.v8i1.

Islam, Md Rabiul, Marwa Qaraqe, Khalid Qaraqe, and Erchin Serpedin. 2024. “CAT-Net: Convolution, Attention, and Transformer Based Network for Single-Lead ECG Arrhythmia Classification.” Biomedical Signal Processing and Control 93. doi:10.1016/j.bspc.2024.106211.

Kementerian Kesehatan Republik Indonesia. 2019.“Penyakit Jantung.” https://p2ptm.kemkes.go.id/informasi-p2ptm/penyakit-jantung?page=13.

Khatib Sulaiman, Jln, Abd A. Mizwar Rahim, Inggrid Yanuar Risca Pratiwi, Muhammad Ainul Fikri, and Universitas Amikom Yogyakarta. n.d. “Klasifikasi Penyakit Jantung Menggunakan Metode Synthetic Minority Over-Sampling Technique Dan Random Forest Clasifier.” Indonesian Journal of Computer Science Attribution 12(5):2023–2995.

Li, Runchuan, Wenzhi Zhang, Shengya Shen, Jinliang Yao, Bicao Li, Bing Zhou, Gang Chen, and Zongmin Wang. 2021. “An Intelligent Heartbeat Classification System Based on Attributable Features with AdaBoost+Random Forest Algorithm.” Journal of Healthcare Engineering 2021. doi:10.1155/2021/9913127.

Matematika, Jurnal Ilmiah, and Socayo Adi. n.d. “MATHunesa Tahun 2022 KOMPARASI METODE SUPPORT VECTOR MACHINE (SVM), K-NEAREST NEIGHBORS (KNN), DAN RANDOM FOREST (RF) UNTUK PREDIKSI PENYAKIT GAGAL JANTUNG Atik Wintarti.”

Pal, Madhumita, and Smita Parija. 2021. “Prediction of Heart Diseases Using Random Forest.” in Journal of Physics: Conference Series. Vol. 1817. IOP Publishing Ltd.

Sari, Juni Nurma, Putri Madona, Hari Kusryanto, Muhammad Mahrus Zain, and May Valzon. 2023. “Electrocardiogram Signals Classification Using Random Forest Method for Web-Based Smart Healthcare.” International Journal of Advances in Applied Sciences 12(2):133–43. doi:10.11591/ijaas.v12.i2.pp133-143.

Switzerland, Geneva. 2020.“WHO Reveals Leading Causes of Death and Disability Worldwide: 2000-2019.” https://www.who.int/news/item/09-12-2020-who-reveals-leading-causes-of-death-and-disability-worldwide-2000-2019.

Tamba, Parsaoran. 2022. “PREDIKSI PENYAKIT GAGAL JANTUNG DENGAN MENGGUNAKAN RANDOM FOREST.” Jurnal Sistem Informasi Dan Ilmu Komputer Prima) 5(2).

Yunarti Butarbutar, Serly, Christian Deniro Napitupulu, Nessa Sanjaya Ginting, Evta Indra, and Delima Sitanggang. 2022. “Http://Infor.Seaninstitute.Org/Index.Php/Infokum/Index INFOKUM Is Licensed under a Creative Commons Attribution-Non Commercial 4.0 International License (CC BY-NC 4.0) CLASSIFICATION OF ELECTROCARDIOGRAM (ECG) WAVES OF HEART DISEASE USING THE XGBOOST METODE METHOD.” JURNAL INFOKUM 10(2).

Downloads


Crossmark Updates

How to Cite

Adya Zizwan Putra, Sitorus, A., Simanjuntak, P. A. R., Mega Cristin Angelina. H., & Situmorang, K. A. . (2025). ECG-Based Arrhythmia Classification in Students Using Random Forest: A Case Study with Class Imbalance Analysis. Sinkron : Jurnal Dan Penelitian Teknik Informatika, 9(2), 905-913. https://doi.org/10.33395/sinkron.v9i2.14793