Data Cleaning and Exploratory Data Analysis for Heart Disease Prediction

Penulis

  • Foezi Arisandi SJ Politeknik Sukabumi, Indonesia
  • Dendy Jonas Managas Universitas Raharja, Indonesia

DOI:

https://doi.org/10.22441/collabits.v3i2.37650

Kata Kunci:

Heart Disease, Data Cleaning, Exploratory Data Analysis, Logistic Regression, Random Forest

Abstrak

Cardiovascular disorders remain a major cause of death worldwide, emphasizing the importance of accurate and timely diagnostic support. This study presents a data-driven framework for predicting heart disease by integrating structured data cleaning procedures, exploratory data analysis (EDA), and supervised machine learning classification. The Heart Statlog (Cleveland-Hungary) dataset, which contains a range of clinical attributes associated with cardiac conditions, is used as the primary data source. To ensure data quality, several preprocessing steps are applied, including treatment of missing values, elimination of duplicate records, correction of inconsistent entries, and transformation of categorical variables into numerical representations. EDA is subsequently employed to explore feature distributions and inter-variable relationships using statistical measures and visualization techniques. Logistic Regression and Random Forest algorithms are implemented to construct predictive models and assess classification performance. The experimental results indicate that chest pain category, ST-segment slope, exercise-induced angina, and maximum heart rate are among the most influential predictors of heart disease. Furthermore, the Random Forest classifier achieves higher overall performance than Logistic Regression, suggesting its stronger capability in modeling complex clinical patterns. These findings confirm that rigorous preprocessing combined with appropriate machine learning methods can significantly enhance predictive accuracy and support the development of reliable clinical decision-support systems.

Unduhan

Data unduhan belum tersedia.

Referensi

[1] D. Dua and C. Graff, “UCI Machine Learning Repository,” University of California, Irvine, 2019. [Online].

[2] S. Rajesh, R. Paul, and M. K. Mishra, “Heart Disease Prediction Using Machine Learning Algorithms,” International Journal of Engineering and Advanced Technology, vol. 8, no. 5, pp. 164-168, 2019.

[3] M. K. Shyamala and M. S. Sharmila, “An Efficient Heart Disease Prediction System Using Data Mining Techniques,” International Journal of Computer Applications, vol. 181, no. 18, pp. 6-11, 2018.

[4] T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning: Data Mining, Inference, and Prediction, 2nd ed. New York: Springer, 2009.

[5] J. Han, M. Kamber, and J. Pei, Data Mining: Concepts and Techniques, 3rd ed. Waltham, MA: Morgan Kaufmann, 2012.

[6] L. Breiman, “Random Forests,” Machine Learning, vol. 45, no. 1, pp. 5-32, 2001.

[7] D. W. Hosmer, S. Lemeshow, and R. X. Sturdivant, Applied Logistic Regression, 3rd ed. New York: John Wiley & Sons, 2013.

[8] U. Nagavelli, D. Samanta, and P. Chakraborty, “Machine Learning Technology-Based Heart Disease Detection Models,” Journal of Healthcare Engineering, vol. 2022, Article ID 7351061, pp. 1-17, Feb. 2022.

[9] F. Yang, H. Wang, H. Mi, et al., “Using random forest for reliable classification and cost-sensitive learning for medical diagnosis,” BMC Bioinformatics, vol. 10, Suppl. 1, S22, 2009.

[10] S. N. Khofiyah and A. P. Kuncoro, “Prediksi Penyakit Jantung Menggunakan Algoritma Random Forest dan Synthetic Minority Oversampling Technique (SMOTE),” KOMPUTA: Jurnal Ilmiah Komputer dan Informatika, vol. 14, no. 1, pp. 1-10, Apr. 2025.

[11] G. Airlangga, “Comparative Analysis of Voting and Stacking Ensemble Learning for Heart Disease Prediction: A Machine Learning Approach,” Jurnal Teknologi Informatika dan Komputer MH. Thamrin, vol. 11, no. 1, pp. 365-377, Mar. 2025.

[12] R. Hidayat, Y. S. Sy, T. Sujana, M. Husnah, H. T. Saputra, and F. Okmayura, “Implementasi Machine Learning untuk Prediksi Penyakit Jantung Menggunakan Algoritma Support Vector Machine,” BIOS: Jurnal Teknologi Informasi dan Rekayasa Komputer, vol. 5, no. 2, pp. 161-168, Sep. 2024.

[13] T. Z. Jasman, E. Hasmin, S. Sunardi, C. Susanto, and W. Musu, “Perbandingan Logistic Regression, Random Forest, dan Perceptron pada Klasifikasi Pasien Gagal Jantung,” CSRID Journal, vol. 14, no. 3, pp. 271-286, Oct. 2022.

[14] Hidayat, A. Sunyoto, and H. Al Fatta, “Klasifikasi Penyakit Jantung Menggunakan Random Forest Classifier,” Jurnal Sistem Komputer dan Kecerdasan Buatan, vol. 7, no. 1, pp. 31-40, Sep. 2023.

[15] M. A. Sembiring and F. W. Sembiring, “Analisa Kinerja Model Regresi dalam Machine Learning untuk Memprediksi Harga Beras,” JOISIE (Journal of Information Systems and Informatics Engineering), vol. 8, no. 1, pp. 144-152, Jun. 2024.

[16] N. H. Alfajr and S. Defiyanti, “Prediksi Penyakit Jantung Menggunakan Metode Random Forest dan Penerapan Principal Component Analysis (PCA),” JITET (Jurnal Informatika dan Teknik Elektro Terapan), vol. 12, no. 3S1, pp. 3457-3464, 2023.

[17] T. Sianturi, L. N. Siahaan, and S. D. Aritonang, “Analisis Aspek-Aspek yang Memengaruhi Penyakit Jantung Menggunakan Model Regresi Logistik Biner Menggunakan Software RStudio,” Jurnal Matematika, vol. 24, no. 1, pp. 73-84, May 2024.

[18] N. H. Alfajr, Garno, and D. Yusup, “Studi Komparasi Algoritma Random Forest Classifier dan Support Vector Machine dalam Prediksi Penyakit Jantung,” JITET (Jurnal Informatika dan Teknik Elektro Terapan), vol. 13, no. 3, pp. 22-30, 2024.

[19] Ridwan, H. H. Handayani, S. A. P. Lestari, and Y. Cahyana, “Evaluasi Kinerja Algoritma Random Forest dan Gradient Boosting untuk Klasifikasi Penyakit Jantung,” Jurnal Komtika (Komputasi dan Informatika), vol. 9, no. 1, pp. 112-124, May 2025.

[20] M. Napiah and S. Heristian, “Perbandingan Algoritma Machine Learning pada Klasifikasi Penyakit Jantung,” Jurnal Infortech, vol. 6, no. 1, pp. 46-51, Jun. 2024.

[21] R. Arisandi and A. L. Dewi, “Analisis Faktor Risiko Gagal Jantung dengan Regresi Logistik Berbasis IoMT,” Jurnal Gaussian, vol. 12, no. 4, pp. 549-559, 2023.

[22] S. A. T. Al Azhima, D. Darmawan, N. F. A. Hakim, I. Kustiawan, M. Al Qibtiya, and N. S. Syafei, “Hybrid Machine Learning Model untuk Memprediksi Penyakit Jantung dengan Metode Logistic Regression dan Random Forest,” Jurnal Teknologi Terpadu, vol. 8, no. 1, pp. 40-46, 2022.

[23] S. Iswari, R. K. Dinata, and H. A. Aidilof, “Heart Disease Classification Based on Medical Record Data Using the Logistic Regression Method,” Jurnal Sistem Komputer dan Informatika (JSON), vol. 7, no. 1, pp. 33-41, Sep. 2025.

[24] D. Ariyanto, Klasifikasi Penyakit Jantung Menggunakan Metode Extreme Learning Machine (ELM) dengan Penanganan Outlier One-Class Support Vector Machine, Skripsi, Program Studi Matematika, Fakultas Sains dan Teknologi, Universitas Islam Negeri Sunan Ampel, Surabaya, 2025.

[25] D. I. Sumantiawan, “Metode Analisis Menggunakan Algoritma Random Forest untuk Prediksi Biaya Asuransi Kesehatan,” Jurnal Informatika dan Teknologi (JICode), vol. 1, no. 1, pp. 1-8, Feb. 2024.

[26] R. Supriyadi, W. Gata, N. Maulidah, and A. Fauzi, “Penerapan Algoritma Random Forest untuk Menentukan Kualitas Anggur Merah,” Jurnal Ilmiah Ekonomi dan Bisnis, vol. 13, no. 2, pp. 67-75, Dec. 2020.

[27] D. Sitanggang, Nicholas, V. Wilson, A. R. A. Sinaga, and A. D. Simanjuntak, “Implementasi Data Mining untuk Memprediksi Penyakit Jantung Menggunakan Metode K-Nearest Neighbor dan Logistic Regression,” Jurnal TEKINKOM, vol. 5, no. 2, pp. 493-501, Dec. 2022.

[28] J. P. Anggraini, C. G. Zhafirah, and A. Desiani, “Perbandingan Algoritma Random Forest dan Extreme Gradient Boosting (XGBoost) dalam Klasifikasi Penyakit Gagal Jantung,” Komputika: Jurnal Sistem Komputer, vol. 14, no. 2, pp. 149-157, Oct. 2025.

[29] A. P. Siregar, D. P. Purba, J. P. Pasaribu, and K. R. Bakara, “Implementasi Algoritma Random Forest dalam Klasifikasi Diagnosis Penyakit Stroke,” Jurnal Penelitian Rumpun Ilmu Teknik (JUPRIT), vol. 2, no. 4, pp. 155-164, Nov. 2023.

[30] Z. Fatah and I. Addewiyah, “Penerapan Algoritma Random Forest dan Teknik SMOTE untuk Prediksi Kematian Akibat Gagal Jantung Menggunakan RapidMiner,” JAMASTIKA, vol. 4, no. 2, pp. 82-89, Oct. 2025.

[31] Edric and S. P. Tamba, “Prediksi Penyakit Gagal Jantung dengan Menggunakan Random Forest,” JUSIKOM PRIMA (Jurnal Sistem Informasi dan Ilmu Komputer Prima), vol. 5, no. 2, pp. 176-181, Feb. 2022.

[32] J. J. Pangaribuan, H. Tanjaya, and Kenichi, “Mendeteksi Penyakit Jantung Menggunakan Machine Learning dengan Algoritma Logistic Regression,” Information System Development, vol. 6, no. 2, Jul. 2021.

[33] Y. Pongkapadang and M. H. Siregar, “Prediksi Faktor Penyakit Jantung Berdasarkan Indikator Kesehatan dan Penyakit Menggunakan Metode Random Forest,” Jurnal Elektro & Informatika Swadharma (JEIS).

[33] D. H. Depari, Y. Widiastiwi, and M. M. Santoni, “Perbandingan Model Decision Tree, Naive Bayes dan Random Forest untuk Prediksi Klasifikasi Penyakit Jantung,” Jurnal Informatik, ed. 18, no. 3, pp. 239-248, Dec. 2022.

Diterbitkan

2026-05-23

Cara Mengutip

[1]
F. A. SJ dan D. J. Managas, “Data Cleaning and Exploratory Data Analysis for Heart Disease Prediction”, Collabits, vol. 3, no. 2, hlm. 170–177, Mei 2026.

Terbitan

Bagian

Articles

Artikel Serupa

Anda juga bisa Mulai pencarian similarity tingkat lanjut untuk artikel ini.