Performance Comparison of K-Nearest Neighbor and Decision Tree C4.5 by Utilizing Particle Swarm Optimization for Prediction of Liver Disease

Zainatul Fadilah, Murnawan Murnawan


As time goes by, the data owned by a sector will accumulate if not used properly. To process large-scale data, we need a technique called data mining.  Data mining can process large-scale data quickly so that many sectors use this technique for classification, clustering, etc. based on the cases they have. The sector that often applies data mining is the health sector. Usually, activities often found in the health sector are activities to diagnose a disease in patients. This study will discuss performance comparison between two data mining algorithms, namely K-Nearest Neighbor (KNN) and Decision Tree C4.5. Then, the algorithms combine with an optimization, namely Particle Swarm Optimization (PSO). The purpose of this study is to compare the performance of the two algorithms to obtain the best performance, which can later be used as a decision to predict disease.

The results obtained indicate that Decision Tree C4.5 with PSO has a better level of performance than KNN with PSO, so Decision Tree C4.5 with PSO can be used in predicting disease. The results obtained are the accuracy value of Decision Tree C4.5 with PSO is 91.26%, and the AUC value is 0.935. Then, Decision Tree C4.5 with PSO in processing data only takes 25 seconds of execution. In this study, to ensure that the two algorithms have significant differences, a trial use t-Test conduct. The results obtained α = 0.007, meaning that the two algorithms have a significant difference, which the parameter requirements, namely α < 0.050.

Full Text:



M. Maulina, “Zat-Zat yang Mempengaruhi Histopatologi Hepar,” Unimal Press, vol. 49, p. 13, 2018, [Online]. Available: Maulina%5D Zat Zat Yang Mempengaruhi Histopatologi Hepar.pdf.

A. P. Ayudhitama and U. Pujianto, “Analisa 4 Algoritma Dalam Klasifikasi Penyakit Liver Menggunakan,” J. Inform. Polinema, vol. 6, pp. 1–9, 2020.

T. A. Y. Siswa, “Analisis Penerapan Optimasi Perbandingan Kinerja Algoritma C4.5 Dan Naïve Bayes Berbasis Particle Swarm Optimization (Pso) Untuk,” J. Bangkit Indones., vol. 7, no. 2, p. 1, 2018, doi: 10.52771/bangkitindonesia.v7i2.48.

T. S. N. Koeswara, M. S. Mardiyanto, and M. A. Ghani, “Penerapan Particle Swarm Optimization (Pso) Dalam Pemilihan Atribut Untuk Meningkatkan Akurasi Prediksi Diagnosispenyakit Hepatitis Dengan Metode Naive Bayes,” J. Speed – Sentra Penelit. Eng. dan Edukasi, vol. 12, no. 1, pp. 1–10, 2020.

Nurahman, “Evaluasi Performa Algoritma C4.5 dan C4.5 Berbasis PSO untuk Memprediksi Penyakit Diabetes,” J. E-Kompetek, vol. 4, no. 1, pp. 30–47, 2020.

A. Noviriandini, P. Handayani, and Syahriani, “Prediksi Penyakit Liver Dengan Menggunakan Metode Naive Bayes dan K-Nearest Neighbor (KNN),” Pros. TAU SNAR-TEK Semin. Nas. Rekayasa dan Teknol., no. November, 2019.

H. Abijono, P. Santoso, and N. L. Anggreini, “Algoritma Supervised Learning Dan Unsupervised Learning Dalam Pengolahan Data,” J. Teknol. Terap. G-Tech, vol. 4, no. 2, pp. 315–318, 2021, doi: 10.33379/gtech.v4i2.635.

A. Setiawati, Intan; Wibowo, Adityo Permana; Hermawan, “Implementasi Decision Tree untuk Mendiagnosis Penyakit Liver,” J. Inf. Syst. Manag., vol. 1, no. 1, pp. 13–17, 2019.

A. R. Kadafi, “Perbandingan Algoritma Klasifikasi Untuk Penjurusan Siswa SMA,” J. ELTIKOM, vol. 2, no. 2, pp. 67–77, 2018, doi: 10.31961/eltikom.v2i2.86.

M. A. Salih, A. H. Alobaidi, and A. M. Alsamarai, “Obesity as a Risk Factor for Disease Development:Part-I Cardiovascular Diseases and Renal Failure,” Indian J. Public Heal. Res. Dev., vol. 11, no. 1, p. 1926, 2020, doi: 10.37506/v11/i1/2020/ijphrd/194136.

Noviandi, “Implementasi Algoritma Decision Tree C4.5 Untuk Prediksi Penyakit Diabetes,” Inohim, vol. 6, no. 1, pp. 1–5, 2018.

N. T. Rahman, F. I. Komputer, U. Darwan, and A. Sampit, “Analisa Algoritma Decision Tree dan Naive Bayes pada Pasien Penyakit Liver,” J. Fasilkom, vol. 10, no. 2, pp. 144–151, 2020.

D. Novianti, “Implementasi Algoritma Naïve Bayes Pada Data Set Hepatitis Menggunakan Rapid Miner,” Paradig. - J. Komput. dan Inform., vol. 21, no. 1, pp. 49–54, 2019, doi: 10.31294/p.v21i1.4979.

A. Ridwan, “Penerapan Algoritma Naïve Bayes Untuk Klasifikasi Penyakit Diabetes Mellitus,” J. SISKOM-KB (Sistem Komput. dan Kecerdasan Buatan), vol. 4, no. 1, pp. 15–21, 2020, doi: 10.47970/siskom-kb.v4i1.169.

F. S. Nugraha, M. J. Shidiq, and S. Rahayu, “Analisis Algoritma Klasifikasi Neural Network Untuk Diagnosis Penyakit Kanker Payudara,” J. Pilar Nusa Mandiri, vol. 15, no. 2, pp. 149–156, 2019, doi: 10.33480/pilar.v15i2.601.

A. A. K. Qodrat, “Perbandingan Algoritma Naïve Bayes Dan K- Nearest Neighbor Untuk Sistem Kelayakan Kredit Pada Nasabah ( Studi Kasus : PT . Armada Finance Cabang Makassar ),” 2017.

R. Kumar, Research Methodology - A step by step guide for beginners - 3rd edition.


  • There are currently no refbacks.

Abava  Absolutech Convergent 2020

ISSN: 2307-8162