Perbandingan Metode K-Nearest Neighbors (K-NN) dan Regresi Logistik Biner Dalam Memprediksi Kanker

Author


Christina Amanda Surbakti(1Mail), Albert Samuel Sinaga(2), Agnes Monica Simorangkir(3), Auta Shinta Sarah(4), Clara Jocelyn Harefa(5), Syairal Fahmy Dalimunthe(6),
(1) Universitas Negeri Medan,
(2) ,
(3) ,
(4) ,
(5) ,
(6) ,

Mail Corresponding Author
Article Analytic
  [File Size: 482KB]  Language: en
Available online: 2025-03-24  |  Published : 2025-03-24
Copyright (c) 2025 Christina Amanda Surbakti
Article can trace at:

Article Metrics

Abstract Views: 51 times PDF Downloaded: 73 times

Abstract



Background: Cancer is one of the diseases with a high mortality rate, so an accurate classification method is needed to support the diagnosis process. This study compares the performance of the K-Nearest Neighbors (KNN) method and Binary Logistic Regression in classifying cancer as malignant or benign. Methods: This study used a secondary dataset from Kaggle consisting of 569 cancer patient data with 11 independent variables covering tumor characteristics. The model was developed using data normalization, training and testing data division, and the K-Fold Cross Validation technique to optimize the K parameter in KNN. Model evaluation was carried out based on accuracy, precision, recall, and the McNemar and ANOVA tests to test the significance of differences in model performance. Results: The KNN model with K=13 showed an accuracy of 95.58%, a precision of 95.83%, and a recall of 97.18%, while Binary Logistic Regression had an accuracy of 94.69%, a precision of 92.86%, and a recall of 92.86%. The McNemar test results showed that there was no significant difference between the two models (p-value = 1), while the ANOVA results showed that all independent variables contributed to the model. Conclusion: Both methods performed well in cancer classification, but KNN with K=13 had a slight advantage in accuracy and recall compared to Binary Logistic Regression. The implementation of this model can support decision support systems in cancer diagnosis to improve the accuracy of classification results.

Keywords


Cancer, Binary Logistic Regression, K-Nearest Neighbors, Prediction

References


Akri, Y. J. (2024). Potensi Tanaman Obat Indonesia Atasi Tumor Dan Kanker Tinjauan Sistematis. Jurnal Ilmu Kesehatan, 280-287.

Alfiani, D., Widayanti, & Putri, M. (2024). Literature Study: Obesitas Sebagai Faktor Risiko pada Kanker Payudara Triple Negative. Bandung Conference Series: Medical Science, 326-329.

Ali, M. M., Hariyati, Pratiwi, M. Y., & Afifah, S. (2022). Metodologi Penelitian Kuantitatif Dan Penenrapannya Dalam Penelitian. Education Journal, 1-6.

Alkhussayid, M. D., & Ferdiansyah. (2022). Implementasi Algoritma K-Nearest Neighbors Pada Penentuan Jurusan Siswa. Jurnal Sistem Komputer dan Informatika, 25-36.

Azhari, M., Situmorang, Z., & Rosnelly, R. (2021). Perbandingan Akurasi, Recall, dan Presisi Klasifikasi pada Algoritma C4.5, Random Forest, SVM dan Naive Bayes. Jurnal Media Informatika Budidarma, 640-651.

Azzahra, N. D., Ambarwati, A., Desiani, A., Maiyanti, S. I., & Ramayani, I. (2024). Perbandingan Algoritma K-Nearest Nighbor Dan Logistic Regression Dalam Klasifikasi Penyakit Kanker Servik. Jurnal Energy, 1-8.

Bakriansyah, M., Subair, A., & Setiawan, W. (2025). Penerapan Data Mining Untuk Memprediksi Penjualan Produk Terlaris UD Timbul Jaya Menggunakan Metode K-Nearst Neighbor. J-CEKI: Jurnal Cendikia Ilmiah, 327-337.

Cahyana, C. W., & Nurlayli, A. (2023). Analisis Performa Logistic Regression, Naive Bayes, dan Random Forest sebagai Algoritma Pendeteksi Kanker Payudara. Information System and Emerging Technology Journal, 51-64.

Cahyanti, D., Rahmayani, A., & Husniar, S. A. (2020). Analisis performa metode knn pada Datset pasien Pengidap Kanker Payudara. Indonesian Journal of Data and Science, 39-43.

Chtouki, K., Rhanoui, M., Mikram, M., & Yousfi, S. (2023). Supervised Machine Learning For Breast Cancer Risk Factors Analysis And Survival Prediction. A Preprint, 1-10.

Fahrurozi, & Wasilah. (2023). Deteksi Dini Kanker Payudara Menggunakan Algoritma K-Nearest Neighbor (KNN) Dan Decision Tree C-45. Teknika, 427-434.

Fajrin, J., Pathurahman, & Pratama, L. G. (2016). Aplikasi Metode Analysis of Variance (ANOVA) untuk Mengkaji Pengaruh Penambahan Silica Fume Terhadap Sifat Fisik dan Mekanik Mortar. Jurnal Rekayasa Sipil, 11-23.

Fasnuari, H. A., Yuana, H., & Chulkamdi, M. T. (2022). Penerapan Algoritma K-Nearest Neighbor (K-NN) Untuk Klasifikasi Penyakit Diabetes Melitus. ANTIVIRUS: Jurnal Ilmiah Teknik Informatika, 133-142.

Kainama, E. C., Palit, E. I., & Hutabarat, I. M. (2022). Analisis Pengaruh Pandemik COVID-19 Terhadap Laju Pertumbuhan Ekonomi Provinsi Papua Dengan Menggunakan Uji McNemar dan Uji Wilcoxon. Cendera Wasih Jurnal of Statistics and Data Science, 40-48.

Martha, S., Andani, W., & Rizki, S. W. (2022). Perbandingan Metode K-Nearest Neighbor, Regresi Logistik Biner, dan Pohon Klasifikasi pada Analisis Kelayakan Pemberian Kredit. EULER: Jurnal Ilmiah Matematika, Sains dan Teknologi, 262-273.

Prasetyo, E. (2012). K-Support Vector Nearest Neighbor Untuk Klasifikasi Berbasis K-NN. SESINDO - Jurusan Sistem Informasi ITS, 245-250.

Pratama, H. R., Naila, I., & Faradita, M. N. (2024). Analisis Keterampilan Kolaborasi Siswa Sekolah Dasar Menggunakan Media Diorama Pada Pembelajaran Materi Ekosistem. Pendas: Jurnal Ilmiah Pendidikan Dasar, 927-937.

Putri, A. A., Titaley, J., & Salaki, D. T. (2022). Model Regresi Logistik Biner Kecenderungan Gejala Maag Pada Mahasiswa Jurusan Matematika FMIPA UNSRAT. Jurnal Matematika dan Aplikasi, 38-43.

Salam, R. R., Jamil, M. F., Ibrahim, Y., Rahmadden, Soni, & Herianto. (2023). Analisis Sentimen Terhadap Bantuan Langsung Tunai (BLT) Bahan Bakar Minyak (BBM) Menggunakan Support Vector Machine. MALCOM: Indonesia Journal of Machine Learning and Computer Science, 27-35.

Solikin, I. (2021). Teknik Data Mining untuk Prediksi Kanker Payudara yang Efisien. Fidelity: Jurnal Teknik Elekrto, 63-67.

Sugiyono, & Hartinah, S. S. (2024). Pemodelan Data Mining Transaksi Penjualan Menggunakan Algoritma Apriori (Studi Kasus: Kedai Ngodeng & Smoothies). Jurnal Indonesia: Manajemen Informatika dan Komunikasi, 3080-3098.

Sujana, S., Juwita, A. R., Rahmat, & Faisal, S. (2024). Penerapan Metode Regresi Logistik Untuk Memprediksi Peristiwa Biner Pasien Pasca Operasi Kanker Payudara. Journal of Information System Research, 1095-1101.

Widyaningsih, Y., Arum, G. P., & Prawira, K. (2021). Aplikasi K-Fold Cross Validation Dalam Penentuan Model Regresi Binomial Negatif Terbaik. Barekeng: Jurnal Ilmu Matematika dan Terapan, 315-322.


Refbacks

  • There are currently no refbacks.

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