Comparison of K-Nearest Neighbor and Decision Tree Methods using Principal Component Analysis Technique in Heart Disease Classification
Abstract
Heart disease has become a global health issue that can threaten anyone, regardless of age. Numerous research efforts have been made to develop classification methods that can aid in diagnosing heart disease. In this study, we compared two classification methods, namely K-Nearest Neighbor (KNN) and Decision Tree, by applying Principal Component Analysis (PCA) technique to the heart disease classification. The dataset used contains relevant clinical attributes. After analyzing the dataset and performing data preprocessing, we applied PCA to reduce the dataset's dimensions. PCA models with KNN and Decision Tree were implemented and evaluated using performance metrics such as Confusion Matrix, F1 Score, and Accuracy. The analysis results showed that the PCA model with Decision Tree outperformed the PCA model with KNN in terms of accuracy. The Decision Tree model successfully classified all data correctly, while KNN had some misclassifications. This research recommends using the PCA model with Decision Tree for heart disease classification with the best performance. However, further research with larger datasets is needed for a deeper understanding
Downloads
References
F. C. Anggoro, "Penerapan Metode K-Nearest Neighbour Untuk Menganalisis Investasi Budidaya Lobster Air Tawar Berbasis Web," JATI (Jurnal Mahasiswa Teknik Informatika), vol. Vol. 3 No. 1, no. 106, pp. 104-109, 2019.
N. M. Pane, M. S. S. Umam and F. N. Fauziah, "Perancang Sistem Pakar Diagnosis Kerusakan Perangkat Keras Menggunakan Pohon Keputusan," Jurnal METHODIKA, vol. Vol. 6 No. 2, no. 30, pp. 29-33, 2020.
A. W. Alwi and A. Sauddin, "Pengembangan Media Pembelajaran Analisis Komponen Utama Berbasis Web Menggunakan Shiny R," jurnal Matematika dan Statistika serta Aplikasinya, vol. Vol.10 No. 2, no. 64 , pp. 63-72, 2022.
R. Kosasih, "Kombinasi Metode Isomap Dan Knn Pada Image Processing Untuk Pengenalan Wajah," CESS (Journal of Computer Engineering System and Science), vol. Vol. 5 No. 2, pp. 166-170, 2020.
D. Cahyanti, A. Rahmayanti and S. A. Husniar, "Analisis performa metode Knn pada Dataset pasien pengidap Kanker Payudara," Indonesian Journal of Data and Science, Vols. Vol 1, No 2, pp. 39-43, 2020.
D. G. Pradana, M. L. Alghifari, M. . F. Juna and S. D. Palaguna, "Klasifikasi Penyakit Jantung Menggunakan Metode Artificial Neural Network," Indonesian Journal of Data and Science (IJODAS), Vols. Vol 3, No 2, pp. 55-60, 2022.
D. P. Utomo, P. Sirait and R. Yunis, "Reduksi Atribut Pada Dataset Penyakit Jantung dan Klasifikasi Menggunakan Algoritma C5.0," Jurnal Media Informatika Budidarma, Vols. Volume 4, Nomor 4, pp. 994-1006, 2020.
Derisma, "Perbandingan Kinerja Algoritma untuk Prediksi Penyakit Jantung dengan Teknik Data Mining," Journal of Applied Informatics and Computing (JAIC), Vols. Vol.4, No.1, pp. 84-88, 2020.
H. Azis, P. F. Fattah and I. P. Putri, "Performa Klasifikasi K-NN dan Cross-validation pada Data Pasien Pengidap Penyakit Jantung," ILKOM Jurnal Ilmiah, vol. Vol. 12 No. 2, pp. 81-86, 2020.
L. Andiani, S. and D. P. Rini, "Analisis Penyakit Jantung Menggunakan Metode KNN Dan Random Forest," Annual Research Seminar (ARS) 2019 Fakultas Ilmu Komputer UNSRI, vol. Vol.5 No.1, pp. 165-169, 2019.
F. Handayani, K. S. Kusuma, H. L. Asbudi, R. . G. Purnasiwi, R. Kusuma, A. Sunyoto and W. M. Pradnya, "Komparasi Support Vector Machine, Logistic Regression Dan Artificial Neural Network dalam Prediksi Penyakit Jantung," JEPIN (Jurnal Edukasi dan Penelitian Informatika), vol. Vol. 7 No. 3, pp. 329-334, 2021.
Sahar, "Analisis Perbandingan Metode K-Nearest Neighbor dan Naïve Bayes Classiffier pada Data Set Penyakit Jantung," Indonesian Journal of Data and Science (IJODAS), Vols. Vol 1, No 3, pp. 79-86, 2020.
N. M. Sunariadi, S. N. Fadilah and D. C. R. Novitasari, "Analisis Resiko Kanker Serviks Menggunakan PCA-ANFIS Berdasarkan Historical Medical Record," JURNAL MEDIA INFORMATIKA BUDIDARM, vol. 6, pp. 1349-1355, 2022.
A. Islamiyati, S. Sahriman and S. Oktoni, "Studi Longitudinal Pada Analisis Data Gula Darah Pasien Diabetes melalui Principal Component Analysis," Jambura Journal Of Mathematics, vol. 4, pp. 41-49, 2022.
S. Mutmainah, "Penanganan Imbalance Data Pada Klasifikasi Kemungkinan Penyakit Stroke," Jurnal SNATi, vol. 1, pp. 10-16, 2021.
A. L. Unihehu and I. Suharjo, "Klasifikasi Jenis Ikan Berbasis Jaringan Saraf Tiruan Menggunakan Algoritma Principal Component Analysis (PCA)," Jurnal Ilmiah Ilmu Komputer, vol. 7, pp. 27-32, 2021.
Copyright (c) 2023 Indonesian Journal of Data and Science
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
License and Copyright Agreement
In submitting the manuscript to the journal, the authors certify that:
- They are authorized by their co-authors to enter into these arrangements.
- The work described has not been formally published before, except in the form of an abstract or as part of a published lecture, review, thesis, or overlay journal.
- The work is not under consideration for publication elsewhere.
- The work has been approved by all the author(s) and by the responsible authorities – tacitly or explicitly – of the institutes where the work has been carried out.
- They secure the right to reproduce any material that has already been published or copyrighted elsewhere.
- They agree to the following license and copyright agreement.
Copyright
Authors who publish with Indonesian Journal of Data and Science agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. (CC BY-NC 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.